A full-stack starter app written in Typescript using Nx, Angular, and NestJS -- built using Bazel
This project was created to demonstrate a fully fledged full-stack typescript application built with Bazel. It showcases basic CRUD operations, authentication, routing, code-sharing between frontend and backend and more.
Frontend application was built according to Angular 8 JWT Authentication Example.
The full list of cool technologies used in this project:
- Lazy loading of each module in the Angular app.
- Monorepo architecture using Nx that allows TypeScript
interfaces to be shared between frontend and backend.
- libs/api-interface: here you can find the shared interfaces.
- Swagger module for documentation.
- After the build you can see the documentation for REST API at
http://localhost:3000/api
.
- After the build you can see the documentation for REST API at
- Passport for login using JWT.
- To access protected routes you should use the HTTP Header:
Authentication: 'Bearer <token>'
- To access protected routes you should use the HTTP Header:
- TypeORM + Postgres for persisting data.
- Docker-compose used to run database, frontend and the backend.
- Bazel build tool for faster builds
The easiest way to run the API, DB and frontend all together is docker-compose:
docker-compose up --build
Without docker, things are a little more complicated:
# installation
yarn install -D
# run frontend
yarn start
# run backend
# assuming DB is already running
yarn start api
After the build the app should be available at http://localhost:4200/
and API docs are at http://localhost:3000/api
.
Created by @rayman1104 @ Scalio