Update README.md to provide a comprehensive overview of The Order monorepo, including repository structure, quickstart guide, development workflow, and contribution guidelines.

This commit is contained in:
defiQUG
2025-11-07 22:34:54 -08:00
parent e020318829
commit 4af7580f7a
128 changed files with 4558 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
# Finance Service
Service for payments, ledgers, rate models, and invoicing.
## Features
- Double-entry ledger
- Payment processing
- Rate models
- Invoicing
- Deal milestone tracking
## Development
```bash
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Build
pnpm build
# Start production server
pnpm start
```
## API Endpoints
- `GET /health` - Health check
- `POST /ledger/entry` - Create ledger entry
- `POST /payments` - Process payment
## Environment Variables
- `PORT` - Server port (default: 4003)
- `DATABASE_URL` - PostgreSQL connection string
- `PAYMENT_PROVIDER` - Payment provider configuration

View File

@@ -0,0 +1,25 @@
{
"name": "@the-order/finance",
"version": "0.1.0",
"private": true,
"description": "Finance service: payments, ledgers, rates",
"main": "./src/index.ts",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"lint": "eslint src --ext .ts",
"type-check": "tsc --noEmit"
},
"dependencies": {
"fastify": "^4.25.2",
"@the-order/schemas": "workspace:*"
},
"devDependencies": {
"@types/node": "^20.10.6",
"typescript": "^5.3.3",
"tsx": "^4.7.0",
"eslint": "^8.56.0"
}
}

View File

@@ -0,0 +1,42 @@
/**
* Finance Service
* Handles payments, ledgers, rate models, and invoicing
*/
import Fastify from 'fastify';
const server = Fastify({
logger: true,
});
// Health check
server.get('/health', async () => {
return { status: 'ok' };
});
// Ledger operations
server.post('/ledger/entry', async (request, reply) => {
// TODO: Implement ledger entry
return { message: 'Ledger entry endpoint - not implemented yet' };
});
// Payment processing
server.post('/payments', async (request, reply) => {
// TODO: Implement payment processing
return { message: 'Payment endpoint - not implemented yet' };
});
// Start server
const start = async () => {
try {
const port = Number(process.env.PORT) || 4003;
await server.listen({ port, host: '0.0.0.0' });
console.log(`Finance service listening on port ${port}`);
} catch (err) {
server.log.error(err);
process.exit(1);
}
};
start();

View File

@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
}