A crypto-to-fiat app for the Ghanaian market, allowing users to sell crypto for Cedis.
- Backend: TypeScript, Node.js, Express
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT with bcrypt password hashing
- Containerization: Docker & Docker Compose
- Testing: Jest with TypeScript support
- Code Quality: ESLint, Prettier
- CI/CD: GitHub Actions
- Node.js 20.x or higher
- PostgreSQL 15 (or use Docker)
- npm or yarn
git clone https://github.com/xpertforextradeinc/CediPay.git
cd CediPaynpm installcp .env.example .envEdit the .env file with your configuration:
DATABASE_URL="postgresql://postgres:password@localhost:5432/cedipay_dev?schema=public"
JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
PORT=4000
NODE_ENV="development"Make sure PostgreSQL is running, then:
# Generate Prisma client
npm run prisma:generate
# Run database migrations
npm run prisma:migratenpm run devThe API will be available at http://localhost:4000
GET /health- Health checkPOST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profile (protected)
# Start all services (app + PostgreSQL)
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downThis will:
- Start PostgreSQL on port 5432
- Start the CediPay API on port 4000
- Automatically run database migrations
- Set up persistent volumes for database data
# Build the image
docker build -t cedipay-backend .
# Run with external database
docker run -p 4000:4000 -e DATABASE_URL="your-db-url" cedipay-backend# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage
npm test -- --coveragenpm run dev- Start development server with hot reloadnpm run build- Build production bundlenpm start- Start production servernpm run lint- Run ESLintnpm run format- Format code with Prettiernpm run typecheck- Run TypeScript type checkingnpm run prisma:generate- Generate Prisma clientnpm run prisma:migrate- Run database migrationsnpm test- Run tests
src/
βββ controllers/ # Route controllers
βββ middleware/ # Express middleware
βββ prisma/ # Database client
βββ routes/ # API routes
βββ types/ # TypeScript type definitions
βββ __tests__/ # Test files
βββ app.ts # Express app configuration
βββ server.ts # Server entry point
prisma/
βββ schema.prisma # Database schema
.github/
βββ workflows/ # CI/CD workflows
The API uses JWT (JSON Web Tokens) for authentication:
- Register:
POST /api/auth/registerwith email, password, firstName, lastName - Login:
POST /api/auth/loginwith email and password - Protected Routes: Include
Authorization: Bearer <token>header
- TypeScript Node.js + Express setup
- PostgreSQL with Prisma ORM
- JWT Authentication
- Docker support
- CI/CD pipeline
- Basic testing infrastructure
- Flutterwave payment gateway integration
- Transaction management
- Crypto price feeds
- Rate calculations
- Frontend application (React/Flutter)
- Real-time notifications
- Advanced security features
- Mobile app development
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
CediPay modules can be integrated with Bubble.io for no-code/low-code development. We provide comprehensive guides for:
- GitHub Sync: Link your Bubble plugins to GitHub for version control and collaboration
- Plugin Development: Best practices for developing CediPay-branded Bubble plugins
- CI/CD Integration: Automated testing and deployment workflows
π View the complete Bubble GitHub Integration Guide for step-by-step instructions on:
- Registering as a Bubble plugin developer
- Connecting GitHub to your Bubble account
- Syncing plugins between Bubble and GitHub
- Managing versioning and collaboration
- Troubleshooting common issues
This enables easier plugin code management, versioning, collaboration, and CI/CD for CediPay modules in the Bubble ecosystem.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support, please contact the development team or create an issue in the repository.