- Redis
- RabbitMQ
The application will not function properly unless these services are running.
Ensure you are using the following Node.js version:
- v22.12.0
pnpm installpnpm run devcd docker-compose/postgres
docker compose -f postgres-compose.yml up --build -ddocker exec -it postgres_db bashEnsure the database mydb is created and configured properly.
psql -U postgres -d mydbdocker compose -f postgres-compose.yml down- List Volumes
docker volume ls
- Inspect Volume
docker volume inspect postgres_db_volume
- Remove Volume
docker volume rm postgres_db_volume
- Show Port
psql -U postgres -d mydb -c "SHOW PORT;" - List Users
psql -U postgres -d mydb -c "\du" - List Databases
psql -U postgres -d mydb -c "\l" - Create Database
psql -U postgres -d mydb -c "CREATE DATABASE mydb;" - Create Table
psql -U postgres -d mydb -c "CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(255), email VARCHAR(255));" - Create User
psql -U postgres -d mydb -c "CREATE USER myuser WITH PASSWORD 'mypassword';" - Grant Privileges
psql -U postgres -d mydb -c "GRANT ALL PRIVILEGES ON DATABASE mydb TO myuser;"
- Reference: Prisma Setup Guide
npx prisma migrate devnpx prisma studionpx prisma generatenpx prisma db pushnpx prisma migrate deploynpx prisma migrate reset- Refer to the following resources:
npx run analyzeThis project uses commander and inquirer for an intuitive command-line interface. The CLI tool can be explored further at its npm package page.
- Check Version
npx ludgi-cli -V
- Create a New Command
npx ludgi-cli -n getUserProfile
- Delete a Command
npx ludgi-cli -d
- List All Commands
npx ludgi-cli -l
- Reference: Redis Documentation
sh docker-compose/redis/up.shdocker compose -f docker-compose/redis/redis-compose.yml up -dUpdate .env file to reflect the new password.
docker exec redis_cache redis-cli CONFIG SET requirepass ludgi1234docker exec redis_cache bash -c 'echo "PING" | redis-cli -a ludgi1234 2>/dev/null'docker compose -f docker-compose/redis/redis-compose.yml downdocker exec -it redis_cache redis-clidocker compose -f docker-compose/rabbitmq/rabbitmq-compose.yml up -ddocker compose -f docker-compose/rabbitmq/rabbitmq-compose.yml down- URL: http://localhost:15672/
- Default Credentials:
- Username:
admin - Password:
admin123
- Username:
- Resources:
- Documentation: Next-Safe-Action
- Documentation:
- Documentation: Storybook
- Start Storybook:
npm run storybook
- Documentation: Cypress
- Open Cypress:
npm run cy:open
Generate dummy data for development purposes:
npx tsx scripts/createDummyData.tsdocker compose -f docker-compose/prometheus_grafana/prometheus-grafana-compose.yml up -d- Prometheus: http://localhost:9090
- Grafana: http://localhost:8081
Install Prometheus client for metrics:
npm install prom-client- Metrics Endpoint:
/api/metrics - Example API:
/api/example
To build the app using Docker Compose, use the following commands:
docker builder prune
docker compose -f app-compose.yml down
docker compose -f app-compose.yml up --build -d
docker compose -f docker-compose/app/app-compose.yml up --build -d- Refer to the Field Selection Documentation.
- Learn more about GraphQL Resolvers.
- Reference: GraphQL-WS Documentation
| Type Definition | Description | Example |
|---|---|---|
| Root Type | Entry point for API requests | Query, Mutation |
| Custom Type | Data structure used by API | User, Post, Comment |
- Reference: Prisma Optimization Guide
docker builder prune # if you want to delete all the build cache
cd docker-compose/app
docker compose -f app-compose.yml down
docker compose -f app-compose.yml up --build -dsh docker-compose/app/build.sh