Skip to content

shvnix/focusly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Focusly – Smart Task Manager

A modern task management web app to help you organize life, boost productivity, and stay focused.
Built with Flask, Firebase, Google OAuth, and TailwindCSS.

Dashboard Screenshot


✨ Features

  • πŸ”‘ Authentication
    • Sign in with Google OAuth
    • Sign in with Phone Authentication via Firebase
    • Secure session management with Flask
  • πŸ“Š User Data Management
    • Store user profiles in Firebase Firestore
    • Track last login and user activity
  • ⏳ Pomodoro Timer
    • Pomodoro, Short Break, and Long Break modes
    • Responsive timer with reset functionality
  • 🌍 Smart Geo Detection
    • Auto-detect user country for phone login
  • 🎨 Beautiful UI
    • Fully responsive landing page
    • Smooth animations & TailwindCSS design
  • πŸ”’ Security Features
    • No-cache headers for sensitive pages
    • Firebase custom tokens for client authentication

πŸ›  Tech Stack

  • Backend: Flask (Python)

  • Frontend: TailwindCSS + Jinja Templates

  • Authentication: Firebase Auth

  • Deployment: Compatible with Heroku / Render / AWS / GCP

  • Environment Management: Python-dotenv

  • Database: Firebase Firestore

  • Database-Er-diagram:

  • ER Diagram

  • Data DictionaryπŸ‘‡

    Collection: users

    Field Type Description
    uid string Firebase UID (Primary Key)
    email string User's email
    phone string User's phone number
    created_at datetime Account creation timestamp

    Subcollection: tasks

    Field Type Description
    task_id string Task Document ID
    title string Title of the task
    description string Detailed description
    due_date datetime Task deadline
    status string Task status (e.g., pending, completed)
    remarks string Optional notes
    created_on datetime Creation timestamp
    updated_on datetime Last updated timestamp

  • Approach: Code-First (Firestore documents are defined via Python logic and js, not SQL).
  • Firestore Indexes Firestore auto-creates indexes for all single fields.

Live link- (https://betsito.com/) server get not maintained due to cost issues visit this link instead β†’ https://focusly-task.onrender.com/

πŸš€ Getting Started

Follow these steps to run Focusly locally.

1️⃣ Clone the repository

git clone https://github.com/shvnix/focusly.git
cd focusly

2️⃣ Create a virtual environment

python -m venv venv
venv\Scripts\activate   # Windows
source venv/bin/activate # Mac/Linux

3️⃣ Install dependencies

pip install -r requirements.txt

4️⃣ Setup Firebase & Google OAuth Credentials

πŸ”Ή Firebase

Create a Firebase project.

Enable Authentication β†’ Email, Google & Phone Sign-in.

Download your Admin SDK JSON and save it as: "firebase_key.json"

5️⃣ Add a firebase_key.json file, Note- also change firebase config in templates

{
  "type": "service_account",
  "project_id": "your-project-id",  
  "private_key_id": "your-private-key-id",  
  "private_key": "-----BEGIN PRIVATE KEY-----\nYOUR-PRIVATE-KEY\n-----END PRIVATE KEY-----\n",  
  "client_email": "your-service-account@your-project-id.iam.gserviceaccount.com",  
  "client_id": "your-client-id",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service-account%40your-project-id.iam.gserviceaccount.com",
  "universe_domain": "googleapis.com"
}

πŸ”Ή Update Firebase Config in Templates

Go to your frontend Firebase initialization code (typically found in a config or .env file used in templates) and update the following fields with your Firebase project details:
// Firebase config (replace with your own project values)
const firebaseConfig = {
  apiKey: "YOUR_API_KEY",
  authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
  projectId: "YOUR_PROJECT_ID",
  storageBucket: "YOUR_PROJECT_ID.appspot.com",
  messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
  appId: "YOUR_APP_ID",
  measurementId: "YOUR_MEASUREMENT_ID"
};

πŸ“Œ Make sure the Firebase web config matches the one found in your [Firebase Console β†’ Project Settings β†’ General β†’ Web App Config].

6️⃣ Run the app

cd backend
python app.py

Now all set.

Visit πŸ‘‰ http://127.0.0.1:5000

πŸ“‚ Project Structure

focusly/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py                  # Main Flask app
β”‚   β”œβ”€β”€ firebase_key.json       # Firebase Admin SDK credentials
β”‚   β”œβ”€β”€ requirements.txt        # Python dependencies
β”‚   β”œβ”€β”€ templates/              # Jinja2 templates (HTML)
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ login.html
β”‚   β”‚   β”œβ”€β”€ register.html
β”‚   β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”‚   β”œβ”€β”€ pomodoro.html
β”‚   β”‚   └── ...others
β”‚   └── static/                 # Videos, images, CSS, JS files
β”‚
β”œβ”€β”€ .env                        # Environment variables (optional)
└── README.md                   # Project documentation

🌐 Deployment Architecture

Deployment Architecture

Domain & Hosting Details

The app is deployed on a privately owned domain using a Germany-based VPS for full control over deployment and performance.

  • Domain: https://betsito.com
  • Registrar: Njalla
  • Server Location: Germany
  • SSL: Enabled via Let's Encrypt
  • Firewall: UFW with allowed ports for HTTP/HTTPS

This setup ensures better control over infrastructure, performance, and security.

βš™οΈ User Acceptance Testing (UAT)

The app was manually tested to ensure readiness for production:

βœ… Register/Login using Email/Password
βœ… Login with Phone OTP (Firebase)
βœ… Add/Edit/Delete/Update Tasks
βœ… Pomodoro Timer Functionality
βœ… Cross-browser checks (Chrome, Firefox, Edge)
βœ… Responsive Design on Mobile and Desktop
βœ… Firebase rules verified for security

No critical bugs found at the time of testing.

try-

use id- top@gmail.com,

password- 1234567890 (only for testing and review the web app in condition sign up not working.)


πŸ“œ License

This project is licensed under the MIT License. Feel free to modify and use it.

πŸ‘¨β€πŸ’» Author

Shivansh Panwar

⚑ β€œFocusly doesn’t just manage your tasks β€” it manages your time, your goals, and your life.”

About

Smart Task Manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors