This project serves as a middleware API for SemantiPay. It facilitates integration of majorly TiDB and Dify.
- Fetch and update payroll data.
- Generate and store compliance rule embeddings using Jina AI.
- Retrieve relevant compliance rules based on embedded queries.
- Log compliance checks for payroll records.
-
Install dependencies (Node.js & Bun are required):
bun install
-
Copy .env.example to
.envand fill in the required values:
- PORT: Port on which the app should run.
- PUBLIC_KEY / PRIVATE_KEY: TiDB credentials.
- TIDB_URL: Connection string for the TiDB database.
- JINA_API_KEY: Jina AI API key.
-
Run the server:
bun start
-
API Endpoints:
- See src/router/router.ts for available routes.
src/controllers/- Route handlers for payroll and compliance logicsrc/util/- Utility functions and type definitionssrc/router/- Express router configurationsrc/index.ts- Server entry point
MIT