This project simulates a fugitive capture scenario where cops select a city and vehicle to attempt capturing a fugitive. It includes both frontend (React) and backend (Node.js with Express and MongoDB) components.
- City Selection: Assume cities are predefined and stored in the MongoDB database.
- Vehicle Selection: Assume vehicle options are predefined and stored in the MongoDB database.
- Fugitive Simulation: Assume the fugitive's location is simulated randomly within one of the cities.
- Capture Criteria: A capture is successful if a cop selects the correct city where the fugitive is located.
- Start/Landing Page: Displays a welcome message and a button to start the capture simulation.
- Capture Page: Allows cops to select a city and vehicle to attempt capturing the fugitive.
- Result Page: Shows the capture status (success or failure) and the city where the fugitive was located.
- React for frontend UI components.
- React Router for navigation between pages.
- Axios for API requests to the backend.
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies for the frontend: npm install
-
Start the frontend development server: npm run dev
This will run the frontend on "http://localhost:5173".