The Robot Cleaner project simulates the movement and cleaning process of a robotic cleaner on a two-dimensional plane. This project showcases the robot's ability to navigate a virtual environment and keep it clean by integrating modular design and scalable technologies.
- Node.js: Version 18.x
- Docker: Installed for containerized execution
- local Postgres or Postgres Docker Container
Install the project dependencies:
npm installStart the development server:
npm run dev- Build the Docker image:
docker compose build
- Start the Docker container:
docker compose up
- The project will be accessible at:
http://localhost:5000
To execute all test suites:
npm run testTo execute integration test suites only:
npm run test:integrationTo execute unit test suites only:
npm run test:unit.
├── migrations/
├── src/
│ ├── queries/
│ ├── routes/
│ ├── services/
│ ├── tests/
│ ├── types/
│ ├── utils/
│ └── index.ts
├── docker-compose.yml
├── Dockerfile
src/index.ts: Entry point of the application.src/queries/: Contains database query logic.src/routes/api.ts: Defines API endpoints.src/services/robot.ts: Manages robot logic and database interactions.src/tests/: Includes unit, integration tests, and mock data.src/types/: Defines TypeScript interfaces and types.src/utils/robot.ts: Implements the robot class logic.migrations/: Holds database migration scripts.docker-compose.yml: Configuration for Docker Compose.Dockerfile: Defines instructions for building the Docker image.
- Simulation Engine: Implements robot navigation and cleaning algorithms.
- Modular Design: Encapsulated services and utilities for clean and maintainable code.
- Database Ready: Includes database interaction logic with queries and migrations.
- Testing: Comprehensive tests to ensure stability and correctness.
- Containerization: Dockerized setup for easy deployment and consistent environments.
- High load and high concurrency performance
- Security