https://github.com/devzom/api-expense-tracker
Learning purpose: Hono API for an expense tracker with SQLite + Prisma ORM + ZOD + basic Bearer included
https://github.com/devzom/api-expense-tracker
hono prisma sqlite zod
Last synced: about 2 months ago
JSON representation
Learning purpose: Hono API for an expense tracker with SQLite + Prisma ORM + ZOD + basic Bearer included
- Host: GitHub
- URL: https://github.com/devzom/api-expense-tracker
- Owner: devzom
- Created: 2025-01-19T12:28:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-04T23:21:06.000Z (over 1 year ago)
- Last Synced: 2025-03-13T12:19:15.153Z (over 1 year ago)
- Topics: hono, prisma, sqlite, zod
- Language: TypeScript
- Homepage:
- Size: 243 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API - Expense Tracker
## Overview
### Learning purpose
Expense tracking API built with Hono, SQLite + Prisma, and TypeScript and basic Bearer.
## Features
- Create, read, update, and delete expenses
- User management
- Validation with Zod
- database with Prisma ORM
### Planned Features
- [x] Reporting capabilities
- [x] User customization options
- [x] Flexible categorization system
- [x] Budget tracking and management
- [ ] Receipt/document management
- [ ] Savings goals tracking
- [ ] Expense sharing capabilities
- [ ] Recurring expense automation
### [Budget Management](./docs/budget.md)
### Performance Optimizations
- Response compression using Hono's built-in compress middleware
- Automatically compresses responses using gzip
- Improves bandwidth usage and loading times
- Smart compression that respects client capabilities
### [Security](./docs/security.md)
## Prerequisites
- Node.js
- PNPM
- SQLite
- Prisma CLI
## Setup
1. Clone the repository
2. Install dependencies:
```bash
pnpm install
```
3. Initialize the database:
```bash
prisma migrate dev
```
4. Seed DB by dummy data
```bash
pnpm seed
```
## Running the Application
- Development mode: `pnpm run dev`
- Production build: `pnpm run build && pnpm start`
## A few examples of endpoints
- `POST /users`: Create a new user
- `POST /expenses`: Create an expense
- `GET /expenses/:userId`: Get all expenses for a user
- `PUT /expenses/:id`: Update an expense
- `DELETE /expenses/:id`: Delete an expense
## Technologies
- Hono
- Prisma
- TypeScript
- Zod
- SQLite
## License
MIT License