HyperFocus is not just another time tracker. It is a Full-Stack Analytics Platform designed for remote workers, developers, and students who want to understand the science behind their productivity.
We all feel busy, but are we productive? HyperFocus helps you answer that question by tracking your "Deep Work" sessions and analyzing exactly what breaks your flowโwhether it's a phone call, a family member, or your own wandering mind.
Try the application live here: https://hyper-focus-six.vercel.app/
Warning
Free Tier Limitations:
- Cold Starts: The backend is hosted on Render's free tier. If the API hasn't been used for a while, the first request may take 50+ seconds to wake up. Please be patient! โณ
- Performance: The database and server run on minimal resources (shared CPU/RAM). Heavy usage might cause slowness.
- Data Persistence: While data is saved, this is a demo environment. Do not use for critical production data.
- Secure Authentication: Built with OAuth2 and JWT (JSON Web Tokens).
- Data Protection: Passwords hashed with Argon2, the winner of the Password Hashing Competition.
- Role-Based Access: Granular permissions for Users and Admins.
- Focus Timer (Pomodoro): Built-in timer with presets (25m, 50m) and visual progress ring.
- One-Click Sessions: Start a "Deep Work" session instantly.
- Frictionless Interruption Logging: Log distractions in seconds without losing your context.
-
AI Insights ๐ง : Local intelligence engine that analyzes your patterns to give personalized productivity tips.
-
Productivity Score: A proprietary algorithm that scores your focus quality (0-100).
-
Interruption Breakdown: Visual Pie Charts identifying your top distractors.
-
Peak Performance Hours: Heatmaps showing when you are most productive.
- Modern UI: Built with React and Vite for blazing fast performance.
- Dark Mode Native: Designed for late-night coding sessions with a custom-tuned dark palette.
- Fully Responsive: Works perfectly on your Desktop, Tablet, and Mobile.
This project was built using industry-standard best practices and modern technologies.
- Language: Python 3.11+
- Framework: FastAPI (High performance, easy to learn)
- Database: SQLite (Dev) / PostgreSQL (Prod ready)
- ORM: SQLModel (The power of SQLAlchemy + Pydantic)
- Testing: Pytest, Factory Boy
- Framework: React 18
- Build Tool: Vite
- State Management: Zustand (Simple, scalable state)
- Routing: React Router v6
- Visualization: Recharts
- Styling: Modern CSS Variables & Responsive Design
- Containerization: Docker & Docker Compose
- CI/CD: GitHub Actions (Automated Testing & Linting)
- Deployment: Ready for Railway (Backend) & Vercel (Frontend)
Want to run HyperFocus on your own machine? Follow these steps.
- Docker (Recommended) OR Python 3.11+ & Node.js 18+
- Git
This will spin up the Backend, Frontend, and Database in isolated containers.
-
Clone the Repository
git clone https://github.com/victormarlor/HyperFocus.git cd HyperFocus -
Launch with Docker Compose
docker-compose up --build
-
That's it!
- Frontend: Open http://localhost
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
If you want to develop or modify the code, run the services locally.
# Navigate to the project root
cd HyperFocus
# Create a virtual environment
python -m venv venv
# Activate it
# Windows:
.\venv\Scripts\Activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the server
uvicorn app.main:app --reloadThe API is now running at http://localhost:8000
Open a new terminal window.
# Navigate to the frontend directory
cd frontend
# Install Node dependencies
npm install
# Start the development server
npm run devThe App is now running at http://localhost:5173
We maintain high code quality standards. You can run our test suites to verify everything is working.
Backend Tests:
pytestFrontend Tests:
cd frontend
npm testA detailed look at the architecture:
HyperFocus/
โโโ .github/
โ โโโ workflows/
โ โโโ ci.yml # CI/CD Pipeline configuration
โโโ app/ # FastAPI Backend Source
โ โโโ core/
โ โ โโโ config.py # Environment configuration
โ โ โโโ deps.py # Dependency Injection
โ โ โโโ logging_config.py # Logger setup
โ โ โโโ security.py # JWT & Password hashing
โ โ โโโ stats_logic.py # Analytics business logic
โ โโโ routers/
โ โ โโโ auth.py # Authentication endpoints
โ โ โโโ interruptions.py # Interruption management
โ โ โโโ sessions.py # Session management
โ โ โโโ stats.py # Statistics endpoints
โ โ โโโ users.py # User management
โ โโโ db.py # Database connection
โ โโโ main.py # App entry point
โ โโโ models.py # SQLModel Database Models
โ โโโ schemas.py # Pydantic Data Schemas
โโโ frontend/ # React Frontend Source
โ โโโ src/
โ โ โโโ api/
โ โ โ โโโ axios.js # Axios instance with interceptors
โ โ โโโ components/
โ โ โ โโโ features/ # Feature Widgets (Timer, Insights)
โ โ โ โโโ layout/ # Layout & Sidebar components
โ โ โ โโโ ui/ # Reusable UI (Buttons, Inputs, Cards)
โ โ โโโ pages/
โ โ โ โโโ DashboardPage.jsx
โ โ โ โโโ LoginPage.jsx
โ โ โ โโโ RegisterPage.jsx
โ โ โ โโโ SessionsPage.jsx
โ โ โโโ store/
โ โ โ โโโ authStore.js # Zustand Auth Store
โ โ โโโ styles/
โ โ โ โโโ layout.css # Responsive Layout Styles
โ โ โ โโโ theme.css # CSS Variables & Dark Mode
โ โ โโโ App.jsx # Main App Component & Routing
โ โ โโโ main.jsx # React Entry Point
โ โโโ Dockerfile # Frontend Dockerfile (Nginx)
โ โโโ package.json # Frontend Dependencies
โ โโโ vite.config.js # Vite Configuration
โโโ tests/ # Backend Integration Tests
โ โโโ conftest.py # Test Fixtures
โ โโโ test_auth.py # Auth Tests
โ โโโ test_interruptions_api.py
โ โโโ test_stats_logic.py
โโโ .dockerignore # Docker exclusion list
โโโ .gitignore # Git exclusion list
โโโ docker-compose.yml # Docker Orchestration
โโโ Dockerfile # Backend Dockerfile
โโโ railway.toml # Railway Deployment Config
โโโ requirements.txt # Backend Dependencies
โโโ README.md # Project Documentation
-
Focus Timer: Pomodoro integration directly in the session view.
-
AI Insights: Local heuristics engine to improve your workflow.
-
Mobile App: Native React Native application.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with โค๏ธ by Victormarlor