https://github.com/iaadi4/tracklytic
Tracklytic is a full-stack habit, expense, and attendance tracker built with Next.js, React Query, Prisma, and PostgreSQL for seamless personal analytics.
https://github.com/iaadi4/tracklytic
betterauth nextjs postgresql prisma react-query shadcn-ui tailwindcss
Last synced: 2 months ago
JSON representation
Tracklytic is a full-stack habit, expense, and attendance tracker built with Next.js, React Query, Prisma, and PostgreSQL for seamless personal analytics.
- Host: GitHub
- URL: https://github.com/iaadi4/tracklytic
- Owner: iaadi4
- License: mit
- Created: 2025-02-03T19:33:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-01T15:59:17.000Z (6 months ago)
- Last Synced: 2026-01-06T20:53:14.538Z (5 months ago)
- Topics: betterauth, nextjs, postgresql, prisma, react-query, shadcn-ui, tailwindcss
- Language: TypeScript
- Homepage: https://tracklytic.vercel.app
- Size: 410 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📊 Tracklytic - Personal Productivity Tracker

**A comprehensive productivity tracking application that helps you build better habits, manage finances, and track your progress**
[](https://nextjs.org/)
[](https://www.typescriptlang.org/)
[](https://www.prisma.io/)
[](https://opensource.org/licenses/MIT)
[✨ Live Demo](https://tracklytic.vercel.app/) • [🐛 Report Bug](https://github.com/iaadi4/Tracklytic/issues) • [💡 Request Feature](https://github.com/iaadi4/Tracklytic/issues)
---
## 🌟 Features
### 🎯 **Habit Tracking**
- Create and monitor personal habits
- Set goals and track progress
- Visual progress indicators
- Monthly/yearly insights
### 📊 **Budget Management**
- Set financial goals
- Monitor savings progress
- Track spending patterns
- Goal completion status
### 📅 **Attendance Management**
- Track class/event attendance
- Completion status monitoring
- Progress visualization
- Historical data tracking
### 💰 **Expense Management**
- Record monthly expenses
- Categorize spending
- Monthly insights
- Expense analytics
### 🔐 **Additional Features**
- **Secure Authentication** with Better Auth
- **Responsive Design** built with Tailwind CSS and shadcn/ui
- **Modern UI/UX** with clean, intuitive interface
- **Real-time Updates** with TanStack Query
- **Email Notifications** via SendGrid
---
## 🚀 Quick Start
### Prerequisites
Before you begin, ensure you have:
-  Node.js 18 or higher
-  npm, yarn, or pnpm
-  Database (PostgreSQL recommended)
### 📦 Installation
1. **Clone the repository**
```bash
git clone https://github.com/iaadi4/Tracklytic.git
cd tracklytic
```
2. **Install dependencies**
```bash
npm install
# or
yarn install
# or
pnpm install
```
3. **Environment Setup**
Create `.env` file in the root directory:
```env
# 🔐 Authentication
BETTER_AUTH_SECRET=BsFFyNBDv9YyJy12hXGFzJMRfL9C2uAQ
BETTER_AUTH_URL=http://localhost:3000
# 🗄️ Database
DATABASE_URL="postgresql://username:password@localhost:5432/tracklytic"
# 📧 Email Service
SENDGRID_API_KEY="your-sendgrid-api-key"
```
4. **Database Setup**
```bash
npx prisma generate
npx prisma db push
```
5. **Start Development Server**
```bash
npm run dev
```
🎉 **That's it!** Open [http://localhost:3000](http://localhost:3000) to see Tracklytic in action.
---
## 🛠️ Tech Stack
| Category | Technology |
|----------|------------|
| **Frontend** |    |
| **Backend** |   |
| **Database** |    |
| **State Management** |  |
| **Email Service** |  |
| **UI Components** |  |
---
## 📁 Project Structure
```
tracklytic/
├── 📱 app/
│ ├── 🔌 api/ # REST API endpoints
│ │ ├── attendance/ # Attendance tracking
│ │ ├── auth/ # Authentication routes
│ │ ├── budget/ # Budget management
│ │ ├── expense/ # Expense tracking
│ │ ├── habits/ # Habit tracking
│ │ └── settings/ # User settings
│ ├── 🔐 (auth)/ # Authentication pages
│ └── 🛠️ (tools)/ # Main application pages
├── 🧩 components/ # Reusable UI components
├── 📚 lib/ # Utilities and configurations
├── 🗄️ prisma/ # Database schema
└── 📦 node_modules/ # Dependencies
```
---
## 🔗 API Reference
### 🔐 Authentication
All protected endpoints require a valid user session.
👤 User Management
- `GET /api/settings` - Get user profile information
🎯 Habit Tracking
- `POST /api/habits` - Create or update habits
- `GET /api/habits` - Retrieve all user habits
- `DELETE /api/habits` - Delete a specific habit
📅 Attendance Tracking
- `POST /api/attendance` - Create or update attendance records
- `GET /api/attendance` - Get all attendance records
- `DELETE /api/attendance` - Delete an attendance record
💰 Budget Management
- `POST /api/budget` - Create or update budget trackers
- `GET /api/budget` - Get all budget trackers
- `DELETE /api/budget` - Delete a budget tracker
💸 Expense Management
- `POST /api/expense` - Create or update expenses
- `GET /api/expense` - Get monthly expenses
- `DELETE /api/expense` - Delete an expense record
---
## 🗄️ Database Schema
Our database is designed with performance and data integrity in mind:
### 🔑 Key Features
- **UUID Primary Keys** for enhanced security
- **Foreign Key Constraints** with cascading deletes
- **Indexed Fields** for optimal query performance
- **Unique Constraints** to prevent data duplication
### 📊 Core Models
- **User** - Primary user entity with authentication
- **Session & Account** - Better Auth session management
- **Habit & HabitTracker** - Habit definitions and progress
- **Attendance** - Class/event attendance tracking
- **Budget** - Financial goal setting and monitoring
- **Expenses** - Monthly expense categorization
- **Verification** - Email verification and password reset
---
## 🤝 Contributing
We love contributions! Here's how you can help make Tracklytic better:
### 🚀 Getting Started
1. **Fork the repository**
```bash
git clone https://github.com/yourusername/Tracklytic.git
```
2. **Create a feature branch**
```bash
git checkout -b feature/amazing-feature
```
3. **Make your changes**
- Write clean, documented code
- Follow the existing code style
- Add tests if applicable
4. **Commit your changes**
```bash
git commit -m 'feat: add amazing feature'
```
5. **Push to your branch**
```bash
git push origin feature/amazing-feature
```
6. **Open a Pull Request**
### 📝 Contribution Guidelines
- **Code Style**: We use TypeScript and follow consistent patterns
- **API Design**: Maintain consistent response formats and error handling
- **UI/UX**: Follow the existing design system using Tailwind CSS
- **Testing**: Add tests for new features when applicable
- **Documentation**: Update README and add comments for complex logic
### 🐛 Found a Bug?
[Create an issue](https://github.com/iaadi4/Tracklytic/issues/new?assignees=&labels=bug&template=bug_report.md) with detailed steps to reproduce.
### 💡 Have an Idea?
[Request a feature](https://github.com/iaadi4/Tracklytic/issues/new?assignees=&labels=enhancement&template=feature_request.md) and let's discuss it!
## 📜 Scripts
| Command | Description |
|---------|-------------|
| `npm run dev` | 🚀 Start development server |
| `npm run build` | 🏗️ Build for production |
| `npm run start` | ▶️ Start production server |
| `npm run lint` | 🔍 Run ESLint |
| `npm run type-check` | ✅ Run TypeScript compiler |
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/iaadi4/Tracklytic/blob/main/LICENSE) file for details.
**Made with ❤️**
⭐ **Star this repo if you find it helpful!** ⭐