Full-stack platform for developers and students to track study sessions and productivity metrics
Features β’ Architecture β’ Stack β’ Installation β’ Commands β’ Docs
StudyTrack Pro is a full-stack application for developers and students to log study sessions, visualize productivity metrics, and maintain consistency in learning routines.
Target audience: self-taught developers, bootcamp participants, and anyone looking to measure technical growth.
Why: full-stack portfolio demonstrating event-driven architecture, distributed cache, TypeScript, real-time WebSocket, and best practices.
| Feature | Description |
|---|---|
| β±οΈ Study Sessions | Manual logging or real-time timer. Link sessions to technologies. |
| π Dashboard | KPIs (total hours, sessions, streak), time-series charts, and technology distribution. |
| π₯ Heatmap | Activity visualization by day/week (GitHub-style). |
| π» Technologies | CRUD for technologies (name, color, icon). Autocomplete search. |
| π― Goals | Set weekly hour goals. Persistence in localStorage. |
| π€ Export | Export analytics data as JSON for a custom date range. |
| π Dark Theme | Dark mode support and customizable theme. |
| β‘ Real-time | Dashboard updates via WebSocket (Laravel Reverb) when sessions change. |
| π Authentication | Registration, login, Sanctum tokens. Device management. |
graph TB
subgraph Frontend["Frontend (Vue 3 + TypeScript)"]
A[Components] --> B[Stores - Pinia]
B --> C[API Client - Axios]
C --> D[TanStack Query Cache]
end
subgraph Backend["Backend (Laravel 12)"]
E[Controllers] --> F[Services]
F --> G[Events]
G --> H[Listeners]
H --> I[Jobs - Horizon]
H --> J[Broadcast - Reverb]
end
subgraph Data["Data"]
K[(PostgreSQL)]
L[(Redis)]
end
C -->|HTTP| E
I --> K
F --> L
J -->|WebSocket| D
D --> A
- Session created/updated/deleted β Event β Listener
- RecalculateMetricsJob on
metricsqueue (2s delay to batch) - Job: recalculates
user_metrics,technology_metrics,daily_minutesin a transaction - Flush user analytics cache
- Event
MetricsRecalculatedβ frontend receives via Reverb
| Schema | Content | Usage |
|---|---|---|
public |
users, technologies, study_sessions | Transactional (writes) |
analytics |
user_metrics, technology_metrics, daily_minutes | Analytics (reads) |
| Frontend | Backend | Infra |
|
|
|
- Docker and Docker Compose
- Git
# 1. Clone
git clone https://github.com/hatanaca/studyStackPro.git
cd studyStackPro
# 2. Configure environment variables
make setup
# 3. Start containers
make dev
# 4. First run: generate key, run migrations and seed
make shell-php
php artisan key:generate
php artisan migrate:fresh --seed
exit
# 5. Build frontend
cd frontend && npm install && npm run build && cd ..
# 6. Access
# API + SPA: http://localhost
# Frontend dev: http://localhost:5173
# Health: http://localhost/api/health
# Horizon: http://localhost/horizon| Service | URL | Description |
|---|---|---|
| API + SPA | http://localhost |
Main application |
| Frontend Dev | http://localhost:5173 |
Vite HMR |
| Health API | http://localhost/api/health |
System status |
| Horizon | http://localhost/horizon |
Queue dashboard |
| pgAdmin | http://localhost:5050 |
PostgreSQL admin (dev) |
| Mailpit | http://localhost:8025 |
Email capture (dev) |
| Command | Description |
|---|---|
make setup |
Creates .env files (first time) |
make dev |
Starts all Docker services |
make stop |
Stops containers |
make shell-php |
Shell into PHP container |
make shell-vue |
Shell into Node container |
make migrate |
Runs migrations |
make fresh |
migrate:fresh --seed |
make test |
Runs backend + frontend tests |
make logs |
Logs from all containers |
studyTrackPro/
βββ backend/ # Laravel 12 API
β βββ app/
β β βββ Events/ # Domain events
β β βββ Jobs/ # RecalculateMetricsJob
β β βββ Listeners/ # Cache invalidation, broadcast
β β βββ Modules/ # Auth, Sessions, Technologies, Analytics
β β βββ Http/ # Controllers, Middleware, Requests, Resources
β βββ database/migrations/ # transactional/ + analytics/
β βββ routes/api.php # /api/v1/*
βββ frontend/ # Vue 3 SPA
β βββ src/
β βββ api/ # HTTP client and modules
β βββ components/ # UI components
β βββ features/ # Domain modules
β βββ stores/ # Pinia stores
β βββ composables/ # useToast, useWebSocket, etc.
β βββ views/ # Dashboard, Sessions, Technologies
βββ docker/ # OpenResty, PHP, Postgres, Redis
βββ redis-scripts/ # Lua: dedup, sliding_window, streak
βββ docs/ # Consolidated documentation
βββ Makefile
| Document | Description |
|---|---|
| backend/README.md | API, endpoints, rate limits, conventions |
| frontend/README.md | Stack, structure, scripts, design system |
| docker/README.md | Docker services, proxy, configuration |
| docs/README.md | Full documentation index |
| Postman Collection | API v1 collection |
- Root:
.env.exampleβ.env - Backend:
backend/.env.exampleβbackend/.env - Frontend:
frontend/.env.exampleβfrontend/.env
β οΈ In production:APP_DEBUG=false, HTTPS, strong passwords. See docs/operations/DEPLOY_SECURITY_PASSO_A_PASSO.md.
- Fork the project
- Create a branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'feat: add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
Educational and portfolio use.
Made with β€οΈ by Thiago Hatanaka