Anaximander is a robust backend service for Open Indoor Maps. Built with Node.js, Express, PostgreSQL/PostGIS, and Prisma.
TBD
- Node.js: JavaScript runtime environment
- Express: Web application framework
- PostgreSQL/PostGIS: Object-relational database with geographic extensions
- Prisma: ORM (Object-Relational Mapper)
- TypeScript:
- Docker: Containerization platform
- Swagger/OpenAPI: API documentation standard
- Jest: JavaScript testing framework
- ESLint/Prettier: Code linting and formatting tools
- Node.js (v22.13.1 LTS or later)
- Docker and Docker Compose
npmoryarnpackage manager
-
Clone the repository:
git clone <repository_url> cd anaximander
-
Install dependencies:
npm install # or yarn install -
Configure environment variables:
Create a
.envfile in the root directory based on the.env.examplefile. Set the appropriate values for your PostgreSQL database connection. Example:POSTGRES_USER=postgres POSTGRES_PASSWORD=password POSTGRES_DB=indoor_nav DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?schema=public"
-
Start the database using Docker Compose:
docker-compose up --build
This will start a PostgreSQL database with the PostGIS extension enabled inside a Docker container.
-
Run Prisma Migrations:
npm run db:migrate npm run db:seed # Seeds the audit_log_type table npm run generateThis will create the database schema and seed the audit log types.
-
Start the development server:
npm run dev
The server will start at
http://localhost:3000.
API documentation is automatically generated using Swagger/OpenAPI. Access it at: http://localhost:3000/api/v1/docs.
npm testThis will execute the unit tests using Jest, providing feedback on code correctness and preventing regressions.
TBD
TBD