Skip to content

lucianosants/atomnyy-api

Repository files navigation

Atomnyy API

NodeJS NestJS TypeScript Postgres Jest JWT Swagger

Atomnyy API is an application built with Nest.js and PostgreSQL to serve the main Atomnyy - Lista de Compras. A straightforward, no-nonsense app to help you organize your supermarket shopping in a simple, direct, and intuitive way.

Technologies

  • Node.js
  • Nest.js
  • TypeScript
  • TypeORM
  • PostgreSQL
  • Docker and Compose
  • Swagger
  • Jest

Deployment

There is a dedicated Dockerfile and docker-compose setup to accommodate deployment on various hosting platforms.

Development

Requirements

  • Node.js
  • Docker and docker-compose
  • Dev Containers Visual Studio Code extension (optional)

To run the project locally, ensure you have Node.js, Docker and docker-compose installed and configured on your machine.

To start local development, run:

docker compose -f .devcontainer/docker-compose.yml up -d
docker compose -f .devcontainer/docker-compose.yml exec api sh bin/setup
docker compose -f .devcontainer/docker-compose.yml exec api sh bin/dev

These commands will spin up the necessary containers and images to run the application in development mode, create database migrations, and start the Nest.js development server. After that, access the API at localhost on port 3000.

Dev Containers

In IDEs that support Development Containers, such as Visual Studio Code, you can start the application locally using the Dev Containers extension. The build commands should run automatically, utilizing the integrated terminal.

Running Tests

Unit and e2e testing support is available in this project. You can run the following commands:

docker compose -f .devcontainer/docker-compose.yml exec api sh bin/test-unit
docker compose -f .devcontainer/docker-compose.yml exec api sh bin/test-e2e

Contributing

See something that can be added or improved? Feel free to contribute! You can fork the project and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.