Mocha core API is a NodeJS project, built with Hono that provides a RESTful API to manage wallets and transaction intents.
The codebase is a work-in-progress (WIP) and is still under development.
- Node.js (version 20.12.X or higher)
- Vercel CLI (for local development)
-
Clone the repository:
git clone https://github.com/christex-foundation/mocha-core-api.git cd mocha-core-api -
Install dependencies:
npm install
-
Set up environment variables:
-
Option 1: Pull from Vercel
npx vercel env pull
-
Option 2: Create a
.envfile based on.env.example
-
-
Start the development server:
npm run dev
Run the test suite:
npm run testmocha-core-api/
├── __tests__/
├── api/
├── src/
│ ├── middleware/
│ ├── repos/
│ ├── routes/
│ ├── schemas/
│ └── utils/
├── scripts/
└── ...__tests__/: Test filesapi/: Serverless function entry pointssrc/: Main source codemiddleware/: Custom middleware (e.g., error handling)repos/: Data access layerroutes/: API route handlersschemas/: Data validation schemasutils/: Utility functions and helpers
scripts/: Utility scripts for development and maintenance
- Implement intents
- Improve the stability of the intents route.
- Refactor and optimize the experimental code sections.
- Implement cash-out conversion flow
- Implement cash-in conversion flow
- Implement Wallet-as-a-Service (WaaS) provider
- Implement check for enum values like payment_method and object (for the types of intent)