This project serves as a starter template for take-home interviews, featuring a frontend built with Angular 16 and a backend built with Nest.js connected to a Mongo database. It's designed to provide a solid foundation for building web applications, with a focus on ease of use and extensibility.
The project is structured into two main directories:
app
: Contains the Nest.js backend application, utilizing Mongoose for MongoDB interactions..ui
: Contains the Angular 16 frontend application.
Additionally, a docker-compose.yml
file is provided to ease the process of building and running the applications along with a MongoDB instance.
- Docker and Docker Compose installed on your machine.
-
Clone this repository to your local machine:
git clone https://github.com/bstanley78/angular-nestjs-starter.git cd angular-nestjs-starter
-
Install dependencies:
cd app && yarn install cd ui && yarn install
-
Build and start the applications using Docker Compose:
docker-compose up --build
-
Access the applications:
- Frontend: Open http://localhost:4200 in your web browser.
- Backend: Send requests to http://localhost:3000.
A MongoDB instance is included in the docker-compose.yml
file, and the Nest.js application is configured to interact with MongoDB using Mongoose. The connection URL is configured in the docker-compose.yml
file, and can be updated to match your preferences.
- A sample
tasks
resource is provided in theapp
project to demonstrate basic CRUD (Create, Read, Update, Delete) operations using Mongoose with MongoDB. NOTE: You do not have to follow these patterns, they are simply here to demonstrate the MongoDB connectivity. - A basic
auth/login
route is provided. It can be used to generate an auth JWT.Route: /auth/login Method: POST Body: { "username": string, "password": string } Notes: Any username/password combination will return a valid JWT that expires in 10m
- Hot Reloading: Hot reloading is enabled for both the frontend and backend applications, allowing for real-time updates as you modify the code.
This project is intended to serve as a starting point for take-home interviews, and is not actively maintained. However, feel free to fork this repository and submit pull requests with any enhancements.
This project is licensed under the MIT License - see the mit-license.org for details.