This repository contains the code base that corresponds to a series of blog posts on full stack development. Check it out here: Full Stack Development Series
- NestJS 9
- REST API with Swagger documentation
- JWT authentication support
- TypeORM for support of various database varieties
- Angular 16
- User registration/login
- Stateless UI
- Storybook integration for component development
- Custom Design Library
- Modular State Management (toggled via
InjectionTokens)
- Jest for backend unit testing, and
supertestfor integration testing - Jest for Angular unit tests
- Cypess + Storybook for UI integration Testing
- > 90% code coverage
- Kubernetes manifests for cluster deployment
- Dockerfiles for standalone and
docker-composesupport - GitHub Actions used for all testing, building, and releasing
- Nx v16 monorepo used for clean directory structure and Nx Cloud for distributed CI tasks
As part of the Deployment Blog Post I added a small overview on deploying this application stack to Render. Both the UI and the REST API docs can be found here:
| Application | |
|---|---|
| Client | https://fst-demo-client.onrender.com/ |
| Server | https://fst-demo-server.onrender.com/api/v1 |
Note Render's free tier spins down these application after they have idled for a while - it can take up to 30 seconds for the applications to spin back up!
To run this project, you will need to copy the .env.sample file in the repository root, rename it .env and fill out the values accordingly:
| Variable | Description/Values |
|---|---|
DATABASE_TYPE |
Passed to TypeORM, supports most major SQL-based databases |
DATABASE_HOST |
Unneeded if using SQLite, can be used with remote databases or local Docker instances |
DATABASE_PORT |
|
DATABASE_USERNAME |
|
DATABASE_PASSWORD |
|
DATABASE_NAME |
|
DATABASE_PATH |
Only used with SQLite for relative file path |
JWT_SECRET |
String used to sign JWTs generated by the API |
JWT_ACCESS_TOKEN_EXPIRES_IN |
Time in seconds that access tokens are valid |
Clone the project
git clone https://github.com/wgd3/full-stack-todoGo to the project directory
cd full-stack-todoInstall dependencies
npm installSet up environment file
cp .env.sample .envStart the server
npx nx run-many --target=serve --allTo run tests, run the following command
# for unit tests
npx nx run-many --target=test --all --codeCoverage
# for E2E tests
npx nx run-many --target=e2e --all