Simplify personal financial control through a complete web solution, enabling organized and visual tracking of income, expenses, and current account balances.
- Node.js (version 18 or higher)
- Docker and Docker Compose
- Git
cd aws-backend-my-moneynpm install# Navigate to the root directory (where docker-compose.yml is located)
cd ..
docker-compose up -ddocker-compose logs postgresCreate a .env file in the prisma/ directory with:
DATABASE_URL="postgresql://myapp_user:myapp_password@localhost:5432/myapp_db"
JWT_SECRET="your_jwt_secret_here"
PORT=3000
# Return to application directory
cd aws-backend-my-money
npx prisma generatenpx prisma migrate deploynpm run devnpm startThe application will be running at: http://localhost:3000
You can test by making a GET request to:
curl http://localhost:3000Should return: My Money Backend API
POST /api/auth/register- Register userPOST /api/auth/login- LoginGET /api/account- List accountsPOST /api/account- Create accountGET /api/categories- List categoriesPOST /api/categories- Create categoryGET /api/transactions- List transactionsPOST /api/transactions- Create transaction
curl -X POST http://localhost:3000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "joao@email.com",
"password": "123456789",
"name": "João Silva"
}'Required fields:
email(required)password(required)name(optional)
Expected success response:
{
"id": 1,
"email": "joao@email.com",
"name": "João Silva",
"createdAt": "2023-08-30T21:00:00.000Z",
"updatedAt": "2023-08-30T21:00:00.000Z"
}Note: The endpoint automatically creates default categories for the new user (Salary, Food, Transport, Shopping, Bills, Entertainment, Health).
- Backend:
Ctrl + Cin terminal - Database:
docker-compose down
# View database logs
docker-compose logs postgres
# Reset database (warning - deletes all data!)
npx prisma migrate reset
# View data in Prisma Studio
npx prisma studio- Backend: Node.js with Express.js
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT with bcrypt password hashing
- Containerization: Docker with docker-compose