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

README
πŸ’Έ 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


Author Information
Bene-Hur Pessoa

πŸ‡§πŸ‡· FrontEnd Engineer @ WeFit | JavaScript | TypeScript | React | Next.js | REST API | GraphQL | UI/UX

Sao Paulo

15

Followers

12

Repositories

0

Gists

2

Total Contributions

Top Contributors

Threads