HTTPS SSH

Country App Seed

This Project is an application skeleton Web App that using Java / Jakarta EE as backend and Custom Component from Angular 6 Framework. The Backend and Frontend can work separately, so you can use our custom component with your own Backend API and vice versa.

The Custom Component has rich capability especially TableData that has pagination, sorting, show-hide column, ordering column, export to excel, etc.

The Backend architecture is designed by Panemu to deal with your common feature such as CRUD Operations, User Authentication/Authorization and also Error Handling.

Prerequisites

  • Git to clone this project.
  • Node & Npm (latest LTS version is recomended)

If you are a Java Programmer or want to use country-server as your backend, you will also need:

Clone country-app-seed

Clone the country-app-seed repository using git:

git clone https://bitbucket.org/panemu/country-app-seed.git
cd country-app-seed

After that you will see two projects country-web and country-server then you can open its with your favorite IDE.

Use Country API

If you are a Frontend Programmer and won't to deal with database and other backend configurations, we provide API for you. Just open file environment.ts inside folder src/environments in country-web project and change API url into :

 API: 'https://scs-demo.panemu.com/country/api/'

Country web is ready to rock and roll with npm-start then login with username & password: hellocountry.

Database Configuration

Create database:

CREATE DATABASE country;

Create a user that has full access to that database:

GRANT ALL PRIVILEGES ON country.* To 'country'@'localhost' IDENTIFIED BY 'yourpassword';

We have provided country.sql in the root of the project. Import the sql file to the database using this command:

mysql -uroot -p country < country.sql

Wildfly Datasource Configuration

Country use Datasource to connect database, you need to install MySQL in Wildfly.

Download MySQL connector here, then create this folder :

wildfly-10.1.0.Final/modules/system/layers/base/com/mysql/main

Put MySQL connector jar in it. Use the lates version, it is 8.0.13 when this document is written. Create a module.xml file and put these lines:

<module xmlns="urn:jboss:module:1.3" name="com.mysql">

    <resources>
        <resource-root path="mysql-connector-java-8.0.13.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.servlet.api" optional="true"/>
    </dependencies>
</module>

Edit <wildfly>/standalone/configuration/standalone.xml file. Add datasource and driver parts of mysql below:

<datasources>
    <datasource jta="true" jndi-name="java:jboss/datasources/Country_DS" pool-name="Country_DS" enabled="true" use-java-context="true" use-ccm="true">
        <connection-url>jdbc:mysql://localhost:3306/country</connection-url>
        <driver>mysql</driver>
        <security>
            <user-name>country</user-name>
            <password>yourpassword</password>
        </security>
        <statement>
            <prepared-statement-cache-size>32</prepared-statement-cache-size>
            <share-prepared-statements>true</share-prepared-statements>
        </statement>
    </datasource>
     <drivers>
        <driver name="mysql" module="com.mysql">
            <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
        </driver>
    </drivers>
</datasources>

Getting started

If you are a Frontend Programmer and won't to deal with database and other backend configurations, we provide API for you. Just open file environtment.ts inside folder environtments in country-web project and change API url into :

 API: 'https://scs-demo.panemu.com/country/api/'

Run npm start for a dev server. Navigate to http://localhost:4200/ in your browser.

Building the project

1. country-server

mvn clean install

Run project from your IDE.

2. country-web

Run npm start for a dev server. Navigate to http://localhost:4200/ in your browser. Then login using username & password: hellocountry.

Main Features:

  • User authentication and authentication using PBAC (permission based access control). User can create new role and assign permissions to it.
  • CRUD for all modules.
  • Data pagination.
  • Save table layout (width, column visibility, column order) in local storage. If using Java backend, user can also save it to database.
  • Advanced Search.
  • Export data to xls format.
  • Support multiple languages.
  • Localized/Internationalized Error Handling.

Disclaimer

Data in this application is dummy. The information might not represent actual fact.

Demo

Link demo is here.

Video demo is here.

Last but not least video installation.

License

BSD LICENSE