A full stack web application using the following guidelines:
- Typescript for both frontend & backend
- Backend using:
- ExpressJS w/ Typescript
- TypeORM
- Postgres DB
- Frontend using:
- Angular 8
- Typescript
I've taken a full stack approach and focused on the following:
- Angular (FE)
- Express (Node.js) Backend
- Postgres
- Used Docker to build a demo stack with the technologies defined above.
- Added CRUD Endpoints for the following:
- creating :
POST /api/v1/product
- edit employees :
PUT /api/v1/product/:id
- deleteing employees :
DELETE /api/v1/product/:id
- creating :
Used TypeORM ORM for DB modeling and management
-
Add a security / auth layer, such that only authenticated users can add or modify employees
-
Add a caching layer (
redis
) to handle large amounts of traffic - even though that would be an overkill for this example.
Added buttons / function to edit/add/delete employees
Added Modal / Form Component for add/edit
- Add buttons/pages to authenticate users to login before making changes to the app
Use Postgres
as the tool of choice because of personal preference.
- Can be easily swapped out for any DB
- Used TypeORM CLI for migrations of DB tables.
- Add replication / caching if application size grows.
- Used
editorconfig
&prettier
for standardized formatting - Used
gitflow
process for merging and development
- Add CI/CD build tools
Requirements:
With docker installed, clone this repo
$ git clone git@bitbucket.org:mdabydeen/fineao-app.git
then navigate into the cloned directory
$ cd fineao-app/
then run the docker
command
$ docker-compose up -d
This will run the following:
- Pull all relevant images from docker hub
- Build a container for the front-end
- Build a container for the backend (
server/
) - Setup a database container running postgresql
- Setup a container with
adminer
- a phpMyAdmin style viewer for your database.
Once the containers are up and running.
- Navigate to
http://localhost:8000
for the front-end - Navigate to
https://localhost:4200
for the backend - Navigate to
https://localhost:9000
for the db view
Steps to setup:
Using mariadb
create a database, let's call it fineao
for this case.
- Copy the
vars.env.example
file intovars.env
- Modify your
var.env
file with the correct info for your database - Run the follow command:
$ source vars.env
For migrations, you will need to:
$ cd server
then run
$ npx typeorm-cli db:migrate
Run the stack by using the following command
$ npm start
Once the containers are up and running.
- Navigate to
http://localhost:8000
for the front-end - Navigate to
https://localhost:4200
for the backend