This is a dummy project used to demonstrate knowledge of Node.js and Angular, as well as development in general. It serves as an example with some bad practices included.
- Backend: Node.js (Express, TypeScript)
- Frontend: Angular
- API: REST with OpenAPI (openapi.yaml file)
/backend- Contains all backend-related files./frontend- Contains all frontend-related files./docs- Contains the OpenAPI definition file and any additional documentation.
-
Navigate to the
backenddirectory:cd backend -
Install the dependencies:
npm install
-
Build and start the server:
npm run build npm start
-
The server will run on port
3000by default. You can change the port by setting thePORTenvironment variable:export PORT=4000 # For Unix-like systems set PORT=4000 # For Windows npm start
GET /messages- Retrieve all messagesPOST /message- Send a new messagePOST /auth/register- Register a new userPOST /auth/login- Log in a user
The OpenAPI definition for the API is located in the /docs directory as openapi.yaml.
-
Navigate to the
frontenddirectory:cd frontend -
Install the dependencies:
npm install
-
Start the development server:
npm run serve
-
The application will be accessible at
http://localhost:4200.
The backend is implemented using Node.js and Express with TypeScript. The main server file is src/index.ts.
Custom error handling middleware is implemented in src/middlewares/errorHandler.ts.
The backend supports a plugin system for extensibility. Plugins are loaded from the plugins directory. A sample chatbot plugin is included in plugins/chatbot.ts.
User authentication is implemented using JWT. Authentication middleware is located in src/middlewares/authMiddleware.ts.
The frontend is implemented using Angular. The main application file is src/app/app.component.ts.
The API follows RESTful practices and is defined using OpenAPI. The definition file is located in /docs/openapi.yaml.
This project is a part of a recruitment exercise to demonstrate knowledge and skills in Node.js and Angular.