API for a "simple" EV stations search. The API is built with NestJS and uses a PostgreSQL database with PostGist extension to store the data. It has endpoints for CRUD operations on the stations/companies and a search endpoint that returns the stations within a given radius from a given point.
The API documentation is available at the /api
endpoint. The documentation is generated with Swagger.
- Refine Typesense search engine configuration and implementation.
- Implement an event-driven architecture to handle the data synchronization between the API and the search engine. It's partially implemented.
- Response form the db search is not paginated
- Both the search and the db search endpoints don't follow the same response format
- Missing grouping of the stations by location in the search endpoint, I think it could be done in code for Typesense search, and return a transformed response to the client
- The search endpoint is not tested - I don't really know how to test the search endpoint
- Missing tests for various parts of the application
- Missing CI/CD pipeline
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
This app can be run in a Docker container. Make sure Docker is installed on your machine.
# build the image
$ docker compose up --build
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.