A full-stack application with a Node.js server and comprehensive test suite.
Install dependencies in both the root directory and the server directory:
# Install root dependencies
pnpm i
# Install server dependencies
cd server
pnpm i
cd ..Make the Docker infrastructure available by running:
pnpm services:detachedThis will start all required services (database and redis) in detached mode.
Navigate to the server directory and start the development server:
cd server
pnpm config:local
pnpm db:seed
pnpm devThe server should now be running and ready to accept requests.
Important: Tests can only be run when the server is running.
To run tests in watch mode:
pnpm test:watchThis will start Jest in watch mode with verbose output and run tests in band.
woovi/
├── server/ # Backend server application
│ ├── src/ # Source code
│ ├── schema/ # GraphQL schema
│ └── package.json # Server dependencies
├── Woovi/ # Project documentation
│ └── Desafio Woovi.md # Changelog and decisions document
├── compose.yaml # Docker Compose configuration
├── jest.config.js # Jest test configuration
└── package.json # Root dependencies and scripts
For detailed information about project decisions, changes, and technical decisions, please refer to the document located at:
Woovi/Desafio Woovi.md
This document serves as both a changelog and a description of the decisions made during the project development.
You can use the provided Woovi Challenge.postman_collection.json file to test and explore the API endpoints using Postman. This collection includes example requests for authentication, user, transaction, and status endpoints. Import it into Postman to quickly get started with API testing and exploration.
pnpm test:watch- Run tests in watch mode (requires server to be running)pnpm services:detached- Start Docker services in detached modepnpm services:down- Stop and remove Docker services
db:seed- Seed the database with two users and log their credentialsconfig:local- Makes an copy of.env.developmentinto.envpnpm dev- Start the development server
The project uses Docker Compose to manage infrastructure services. The configuration is defined in compose.yaml at the root of the project.
- The server runs on the port specified in the server's environment configuration
- Tests are configured to run against the running server instance
- Environment variables are managed through
.envfiles in the server directory
- Make sure Docker is running before starting the services
- The server must be running for tests to pass
- All dependencies should be installed using
pnpmfor consistency