wallet25-api
An API for managing personal financial items, built with Fastify, Drizzle ORM, and PostgreSQL β with optional integration to an MCP server for LLM-based automation.
GitHub Stars
0
User Rating
Not Rated
Forks
0
Issues
0
Views
1
Favorites
0
πΈ wallet25-api
An API for managing personal financial records like expenses, income, and categories β built with Fastify, Drizzle ORM, Zod, and PostgreSQL.
It also supports MCP Server integration to enable LLM-based automations with contextual intelligence.
π Technologies
- Fastify β Lightweight and fast Node.js web framework
- Drizzle ORM β Type-safe SQL ORM for PostgreSQL
- Zod β Runtime schema validation
- PostgreSQL β Relational database
- TypeScript β Type-safe codebase
- dotenv β Environment variable handling
- MCP Server (Model Context Protocol) β For AI agent integration
π¦ Installation
git clone https://github.com/your-username/wallet25-api.git
cd wallet25-api
npm install
π οΈ Development
# Start development server
npm run dev
Create a .env
file at the root of the project with your database connection string:
DATABASE_URL=postgresql://user:password@localhost:5432/wallet25
π§± Migrations
This project uses Drizzle Kit to manage migrations.
# Generate migration file from schema
npx drizzle-kit generate
# Run migrations
npx drizzle-kit migrate
π Endpoints (examples)
Method | Route | Description |
---|---|---|
GET | /items/month/:year/:month |
Get items by year and month |
GET | /items/:id |
Get a single item by ID |
GET | /items/category/:category |
Get items by category |
POST | /items |
Create a new item (Zod-validated) |
PATCH | /items/:id |
Update a specific item (partial update) |
DELETE | /items/:id |
Delete an item by ID |
π§ LLM Integration (optional)
This API can be connected to an MCP Server (Model Context Protocol) to empower LLM agents with:
- π§ Contextual understanding of user data
- π οΈ Tool execution such as querying categories, values, or statistics
- π Memory & state, enabling multi-step conversations
- π Live data access via custom tools and backend endpoints
This opens the door to create intelligent chatbots or automations that interact with financial data β for example:
βHow much did I spend last month on groceries?β
βCreate a new entry for a $150 deposit.β
π Project Structure
src/
βββ db/ # Drizzle schema and database config
βββ routes/ # Fastify route handlers
βββ schemas/ # Zod validation schemas
βββ server.ts # App entrypoint
π License
This project is licensed under the ISC License.
π¨βπ» Author
Made with β€οΈ by Bene-Hur Pessoa
π§π· FrontEnd Engineer @ WeFit | JavaScript | TypeScript | React | Next.js | REST API | GraphQL | UI/UX
15
Followers
12
Repositories
0
Gists
2
Total Contributions