The backend is written in
express.jsand follows MVC pattern.MySQLis used for persistence.
Project structure:
- controller : This represents the controller configuration that acts as BLL of the projects.
- migrations : Import the sql file to setup database and tables in your
MySQLclient. - routes : This folder contains the route (path) configuration of the project and maps each incoming request to corresponding controller.
- utils : Named by utilities, this contains
database.jswhich is DB configuration of the project. - app.js : This is the start point of this project.
Steps to setup this locally:
- From the project root, navigate to
Backend. - Run
npm installto install dependencies. - Update
utils/database.jsto update connection details as per your DB configuration. - Run
npm startto start server locally.
The front end of this project is an
Angularapp withbootstrap 4+styling
Project structure:
- error : Global error components to be placed here.
- navigation : Header/footer components placed here.
- services : This folder contains domain specific services that conencts the application to API
- AppRoutingModule.ts : Routing configuration of the application
- http.interceptor.ts : Application request inteceptor to have request making logic, authentication headers, token etc at one place.
Steps to setup this locally:
- From the project root, navigate to
FrontEndClient. - Run
npm installto install dependencies. - Update
environments/environment.tsfile for the API endpoint URL. It is set tohttp://localhost:3000by default. - Run
ng serveto start the application.