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:
44
services/dataroom/README.md
Normal file
44
services/dataroom/README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Dataroom Service
|
||||
|
||||
Service for secure VDR (Virtual Data Room), deal rooms, and document access control.
|
||||
|
||||
## Features
|
||||
|
||||
- Deal space management
|
||||
- Folder ACLs (OPA policies)
|
||||
- Watermarking
|
||||
- Expiring links
|
||||
- Activity logs
|
||||
- Integration with finance service for deal states
|
||||
|
||||
## 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 /deals` - Create deal room
|
||||
- `GET /deals/:dealId` - Get deal room
|
||||
- `POST /deals/:dealId/documents` - Upload document
|
||||
- `GET /deals/:dealId/documents/:documentId/url` - Get presigned URL
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `PORT` - Server port (default: 4004)
|
||||
- `DATABASE_URL` - PostgreSQL connection string
|
||||
- `STORAGE_BUCKET` - Storage bucket for documents
|
||||
- `OPA_URL` - Open Policy Agent URL for access control
|
||||
|
||||
27
services/dataroom/package.json
Normal file
27
services/dataroom/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@the-order/dataroom",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "Dataroom service: secure VDR, deal room APIs",
|
||||
"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/storage": "workspace:*",
|
||||
"@the-order/auth": "workspace:*",
|
||||
"@the-order/schemas": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.6",
|
||||
"typescript": "^5.3.3",
|
||||
"tsx": "^4.7.0",
|
||||
"eslint": "^8.56.0"
|
||||
}
|
||||
}
|
||||
|
||||
54
services/dataroom/src/index.ts
Normal file
54
services/dataroom/src/index.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Dataroom Service
|
||||
* Handles secure VDR, deal rooms, and document access control
|
||||
*/
|
||||
|
||||
import Fastify from 'fastify';
|
||||
|
||||
const server = Fastify({
|
||||
logger: true,
|
||||
});
|
||||
|
||||
// Health check
|
||||
server.get('/health', async () => {
|
||||
return { status: 'ok' };
|
||||
});
|
||||
|
||||
// Create deal room
|
||||
server.post('/deals', async (request, reply) => {
|
||||
// TODO: Implement deal room creation
|
||||
return { message: 'Deal creation endpoint - not implemented yet' };
|
||||
});
|
||||
|
||||
// Get deal room
|
||||
server.get('/deals/:dealId', async (request, reply) => {
|
||||
// TODO: Implement deal room retrieval
|
||||
return { message: 'Deal retrieval endpoint - not implemented yet' };
|
||||
});
|
||||
|
||||
// Upload document to deal room
|
||||
server.post('/deals/:dealId/documents', async (request, reply) => {
|
||||
// TODO: Implement document upload
|
||||
return { message: 'Document upload endpoint - not implemented yet' };
|
||||
});
|
||||
|
||||
// Get presigned URL for document access
|
||||
server.get('/deals/:dealId/documents/:documentId/url', async (request, reply) => {
|
||||
// TODO: Implement presigned URL generation
|
||||
return { message: 'Presigned URL endpoint - not implemented yet' };
|
||||
});
|
||||
|
||||
// Start server
|
||||
const start = async () => {
|
||||
try {
|
||||
const port = Number(process.env.PORT) || 4004;
|
||||
await server.listen({ port, host: '0.0.0.0' });
|
||||
console.log(`Dataroom service listening on port ${port}`);
|
||||
} catch (err) {
|
||||
server.log.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
start();
|
||||
|
||||
10
services/dataroom/tsconfig.json
Normal file
10
services/dataroom/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user