Getting Started
Relevant source files
The following files were used as context for generating this wiki page:
The Marketplace project consists of a server-side application built with NestJS and a client-side application built with Angular. This guide provides the necessary steps to install dependencies, configure the environment, and run both applications for development and production.
Sources: README.md:1-2, marketplace-backend/app/README.md:31-33, marketplace-frontend/README.md:1-3
Backend Setup (NestJS)
The backend application provides a REST API for the marketplace. It requires Node.js and uses the NestJS framework with Mongoose for MongoDB integration.
Installation and Execution
- Navigate to the
marketplace-backend/appdirectory. - Install dependencies using
npm install. - Start the application using one of the available scripts in
package.json.
Sources: marketplace-backend/app/package.json:7-17, marketplace-backend/app/README.md:35-51
| Command | Description |
|---|---|
npm run start | Starts the application in standard mode. |
npm run start:dev | Starts the application in watch mode using local.env. |
npm run start:prod | Starts the application in production mode using production.env. |
npm run test | Executes unit tests using Jest. |
Sources: marketplace-backend/app/package.json:11-15
Application Bootstrapping
The backend initializes using NestFactory. It configures Swagger documentation, CORS, and global filters during the bootstrap process.
Frontend Setup (Angular)
The frontend application provides the user interface. It is built using Angular 13 and Material Design components.
Installation and Execution
- Navigate to the
marketplace-frontenddirectory. - Install dependencies using
npm install. - Use the Angular CLI via npm scripts to serve or build the app.
Sources: marketplace-frontend/package.json:16-43, marketplace-frontend/README.md:7-21
| Command | Description |
|---|---|
npm run start | Serves the app on as.localhost.com:4200. |
npm run build | Compiles the application into the dist/ directory. |
npm run test | Runs unit tests via Karma. |
npm run lint | Runs TSLint for code quality checks. |
Sources: marketplace-frontend/package.json:4-9
Build Configuration
The Angular workspace is defined in angular.json, specifying the project root, build targets, and environment replacements for production.
Project Structure Summary
The following table summarizes the key technologies and configurations for both modules.
| Feature | Backend (marketplace-backend/app) | Frontend (marketplace-frontend) |
|---|---|---|
| Framework | NestJS v8 | Angular v13 |
| Language | TypeScript | TypeScript |
| Styling | N/A (REST API) | Less |
| Testing | Jest | Karma / Protractor |
| Main Entry | src/main.ts | src/main.ts |
| Config File | package.json | angular.json |
Sources: marketplace-backend/app/package.json:23-74, marketplace-frontend/package.json:16-75, README.md:1-2
Summary
The Marketplace system is a full-stack application requiring concurrent execution of the NestJS backend and Angular frontend. The backend manages data persistence and API documentation via Swagger, while the frontend provides a responsive UI utilizing Angular Material and translation services.
Sources: marketplace-backend/app/src/main.ts:14-20, marketplace-frontend/src/app/app.module.ts:32-60