A web-based application that helps students efficiently manage their finances by tracking expenses, viewing monthly summaries, and analyzing spending habits through data visualizations.
- Expense Tracking & Categorization
- Monthly Summary
- Budgeting Tips
- Data Visualization
- Financial Goal Setting
- Recurring Expense Reminders
- User Authentication
- Backend: Fastify, TypeScript, Node.js
- Database: PostgreSQL with Prisma ORM (Using Neon)
- Logging: Winston
- Deployment: Vercel
- Authentication: JWT
- Node.js (v16+)
- npm or yarn
- PostgreSQL (Using Neon cloud database)
git clone https://github.com/yourusername/student-finance-tracker.git
cd student-finance-trackernpm installCreate a .env file in the root directory:
PORT=3000
NODE_ENV=development
DATABASE_URL="your_neon_database_url"
JWT_SECRET=your-secret-key
APP_CLIENT_ID=your-client-id
JWT_ISS=your-iss# Generate Prisma client
npx prisma generate
# Apply database schema changes
npx prisma db pushnpm run buildnpm run dev- Install Vercel CLI:
npm install -g vercel
- Login to Vercel:
vercel login
- Deploy the project:
vercel --prod
- If database schema updates are needed:
npx prisma db push
├── README.md
├── package.json
├── package-lock.json
├── tsconfig.json
├── prisma/
│ ├── schema.prisma # Prisma schema
│ └── migrations/ # Database migrations
└── src/
├── app.ts # Application setup
├── server.ts # Server entry point
├── config/
│ └── config.ts # App configuration
├── lib/ # Shared libraries
│ └── prisma.ts # Prisma client instance
├── modules/
│ └── auth/ # Feature modules
│ ├── controller.ts
│ ├── service.ts
│ └── route.ts
├── router/
│ └── master.router.ts # Main router
└── utils/
└── logger.ts # Winston logger setup
Prisma is a modern ORM that simplifies database operations and provides type-safety.
-
Configure Prisma Schema
The
prisma/schema.prismafile defines your database schema:generator client { provider = "prisma-client-js" } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model User { id Int @id @default(autoincrement()) email String @unique password String name String? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt expenses Expense[] } model Expense { id Int @id @default(autoincrement()) amount Float category String description String? date DateTime createdAt DateTime @default(now()) updatedAt DateTime @updatedAt userId Int user User @relation(fields: [userId], references: [id]) }
-
Apply Schema Changes
npx prisma db push
-
Generate Prisma Client
npx prisma generate
-
Database Management
# View your database using Prisma Studio npx prisma studio
# Run tests
npm testAPI documentation is available at url-to-update/api/documentation when the server is running.
- POST
/auth/login- Login and get JWT
More endpoints to be added as development progresses
# Start development server with hot-reload
npm run dev
# Build for production
npm run build
# Run linting
npm run lint
# Run tests
npm test
# Prisma commands
npx prisma studio # Open Prisma Studio
npx prisma db push # Apply schema changes
npx prisma generate # Generate Prisma client- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is for educational purposes only and does not include a formal license.