https://github.com/henriqueyun/payables
Application that permits to the user to register payables in name of assignors in a system
https://github.com/henriqueyun/payables
authentication backend docker docker-compose express frontend full-stack js jwt microservice nest node orm prisma rabbitmq swagger typescript
Last synced: 3 months ago
JSON representation
Application that permits to the user to register payables in name of assignors in a system
- Host: GitHub
- URL: https://github.com/henriqueyun/payables
- Owner: henriqueyun
- Created: 2024-11-19T01:26:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-22T12:01:48.000Z (over 1 year ago)
- Last Synced: 2026-01-03T16:22:47.584Z (6 months ago)
- Topics: authentication, backend, docker, docker-compose, express, frontend, full-stack, js, jwt, microservice, nest, node, orm, prisma, rabbitmq, swagger, typescript
- Language: TypeScript
- Homepage:
- Size: 472 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Payables
This is a **Full-stack Project** developed as part of the [CHALLENGE.md](./CHALLENGE.md).
This README provides instructions on setting up and running the application to manually test its features.
## General Setup
- **Node.js**: 18.18.2
- **Yarn**: 1.22.22
## Backend
### Setting Up
Before starting, ensure you define the required environment variables using a `.env` file. Refer to `.env.example` for the necessary variables.
### Running the Backend
Run the backend locally with the following commands:
```bash
yarn
yarn start:dev
```
Alternatively, you can use Docker Compose:
```bash
chmod +x ./setup-dev
./setup-dev # ⚠️ Warning: This will remove ALL running and stopped containers.
docker compose up -d
```
Once started, the API will be available at `http://localhost:3000` by default. You can customize the port using the `PORT` variable in the `.env` file.
### API Documentation
Access the built-in API documentation at the `/api-docs` endpoint.
> ⚠️ Note: The batch service works only when using Docker Compose, as it requires RabbitMQ to function.
## Consumer
The Consumer is preconfigured to connect to RabbitMQ's default local URL, which is exposed via Docker Compose. To run the Consumer, use the following commands:
```bash
yarn
yarn start:dev
```
## Frontend
To start the frontend application, run:
```bash
yarn
yarn dev
```
## TODO
This project is still a work in progress and lacks features like Unit Tests, Resilience, and Infrastructure as Code. Below are specific tasks planned for each component:
### Backend
- Add a relation between `assignor` and `payable` in Prisma.
- Define a default queue in Prisma.
- Limit field lengths in Prisma.
### Consumer
- Review and remove unused code.
### Frontend
- Validate input data and display error messages to users.
### Monorepo
- Turn this repo into a functional monorepo.
## Additional Resources
I created a simple design to guide the development of the frontend interface. You can view it on [Figma](https://www.figma.com/design/A9mOZMYIBTNwB482RRcZSl/Aprove.me---Bank.me?node-id=0-1&node-type=canvas).