My very first quite simple project in Angular and ExpressJS.
By doing it I have got basic understanding of how these frameworks work.
Especially in Angular I've learned about how components work, how to use services to share data amoung application, split responsibilities, use interceptors, store tokens required for authentication and set up guards.
In ExpressJS I've got to know how to connect to mongdb database, create and manage models, set up routes and secure them using middleware.
- User Authentication using JWT
- User roles
- Browsing, reserving, commenting and rating dishes
- Adding new or modifying existing dishes
- Browse dishes
- Create new account
- Login
- Reserve, comment, rate dishes
- Add, Delete and modify dishes
- Manage user roles
- Ban users
This project was created befeore I though about adding Docker, so unfortunately it is not customizable very much.
Docker compose starts database with custom data.
You should now have access to:
- http://localhost:4200/ - front
- http://localhost:3000/ - back
- http://localhost:8088/ - database explorer
Available accounts: (username-password)
- admin-admin
- manager-manager
- client1-client1
- client2-client2
- client3-client3
Start containers:
docker-compose -f docker-compose.yaml up -d
Close containers:
docker-compose -f docker-compose.yaml down
In "backend" folder ".env" file with provided variables is required:
- DB_CONNECTION=mongodb+srv://user:password@db
- JWT_SECRET=secret