Skip to content

RichDom2185/duckpay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DuckPay

Digital cash equivalent.

Project structure

This project is a monorepo set up using Turborepo.

.
β”œβ”€β”€ apps
β”‚  β”œβ”€β”€ account-service
β”‚  β”œβ”€β”€ atm
β”‚  β”œβ”€β”€ payment-service
β”‚  └── web
β”œβ”€β”€ deployment
β”‚  └── nginx-config
β”œβ”€β”€ docker-compose.yml
└── packages
   β”œβ”€β”€ accounts
   β”œβ”€β”€ api
   β”œβ”€β”€ config-eslint
   β”œβ”€β”€ config-typescript
   └── payments
  • apps - Contains the services & applications that make up the project
    • account-service - The account service backend (Express.js, TypeScript)
    • atm - The ATM frontend application (React.js, TypeScript)
    • payment-service - The payment service backend (Express.js, TypeScript)
    • web - The frontend web application (React.js, TypeScript)
  • deployment - Contains the deployment configurations for the project
    • nginx-config - Contains the Nginx configuration for the project
  • docker-compose.yml - The Docker Compose configuration for the project
  • packages - Contains the shared packages used across the project
    • accounts - Contains the account database client (Prisma)
    • api - Contains the shared API client (Axios)
    • config-eslint - Contains the shared ESLint configuration
    • config-typescript - Contains the shared TypeScript configuration
    • payments - Contains the payment database client (Prisma)

Deployment

The project is managed using Docker Compose. Simply run the build command to deploy:

docker compose up

Once deployed & up & running, you will need to create & deploy migrations to your database to add the necessary tables. This can be done using Prisma Migrate:

npx prisma migrate dev

If you need to push any existing migrations to the database, you can use either the Prisma db push or the Prisma migrate deploy command(s):

yarn run db:push

# OR

yarn run db:migrate:deploy

There is slight difference between the two commands & Prisma offers a breakdown on which command is best to use.

An optional additional step is to seed some initial or fake data to your database using Prisma's seeding functionality.

yarn run db:seed

Useful Links

Learn more about the power of Turborepo:

About

πŸ¦†πŸ’° Submission for TikTok TechJam 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors