This project is a MEAN stack booking application. It is a client-server web application where the Angular frontend communicates with the Node + Express backend, which in turn interacts with a MongoDB database.
The application allows users to create, view and manage bookings, with proper handling of data validation, authentication and server-side logic. There are three types of users: admin, home owner and guest, each with its own set of functionalities. The frontend provides a responsive UI, while the backend exposes RESTful APIs and handles all business logic.
The project consists of two separate parts and a db:
frontend/- Angular applicationbackend/- Node+Express applicationdatabase/- JSON files to populate MongoDB
Before running the project, you need to:
- Install dependencies for both frontend and backend.
- Start MongoDB server.
- Import JSON files from the
database/folder to seed the database.
Make sure MongoDB is running on your machine on port 27017.
The database/ folder contains JSON files that can be used to populate the MongoDB database with initial data. You can import these files using MongoDB tools (e.g., mongoimport or MongoDB Compass) before running the application to seed the database.
Navigate to the frontend directory and install dependencies with npm install.
This will generate the node_modules directory required to run the Angular application.
To start the frontend developement server, run:
npm startor
ng serveAccess the frontend at http://localhost:4200
Navigate to the backend directory and install dependencies with npm install.
This will generate the node_modules directory required to run the Node application.
Build the backend application:
npm run buildStart the backend server:
npm startThe server runs on http://localhost:4000 and communicates with MongoDB.