Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeZone

A full-stack, AI-powered productivity application designed to eliminate task paralysis, track your daily momentum, and keep your goals clear, calm, and doable.

Features

  • Smart Routing — Separates your "Master Backlog" from "Today's Focus" to reduce cognitive load and overwhelm.
  • AI Task Co-Pilot — Integrates Google's Gemini API to automatically break down intimidating goals into 3 actionable steps with a Human-in-the-Loop (HITL) approval modal.
  • Habit Tracking & Analytics — A dedicated "My Wins" dashboard featuring streak tracking, perfect day calculations, and an interactive GitHub-style contribution calendar.
  • Premium Glassmorphism UI — A sleek, dark-mode interface with ambient glowing backgrounds, frosted glass panels, and custom cursor tracking.
  • Secure API Gateway — All database operations and AI prompts are routed through a robust Ballerina backend, keeping API keys completely hidden from the client.

Tech Stack

Frontend

  • React (via Vite)
  • Tailwind CSS
  • React Router
  • WSO2 Asgardeo (Authentication SDK)

Backend

  • Ballerina (API Gateway & Logic Controller)
  • Google Gemini 1.5 Flash API
  • ballerina/http & ballerina/time modules

Infrastructure & Database

  • Supabase (Hosted PostgreSQL)
  • WSO2 Asgardeo (Identity Provider)

Project Structure

FreeZone/
├── backend/
│   ├── Config.toml           # Not committed (contains secrets)
│   ├── Dependencies.toml
│   ├── main.bal              # Main Ballerina server & endpoints
│   └── types.bal             # (Optional) Data record definitions
└── frontend/
    ├── .env                  # Not committed
    ├── index.html
    ├── vite.config.js
    ├── package.json
    └── src/
        ├── App.jsx           # Main layout, Glassmorphism UI, & Routing
        ├── main.jsx
        ├── index.css         # Tailwind directives
        └── pages/
            ├── Home.jsx      # Today's Focus
            ├── AllTasks.jsx  # Master Backlog & AI Modal
            ├── CreateGoal.jsx
            ├── Progress.jsx  # Habit Calendar & Analytics
            └── Profile.jsx


Getting Started

Prerequisites

1. Clone the repository

git clone https://github.com/yourusername/FreeZone.git
cd FreeZone

2. Set up environment variables

Backend — create backend/Config.toml:

supabaseUrl = "https://your-project-id.supabase.co"
supabaseServiceKey = "your_supabase_service_role_key"
geminiApiKey = "your_google_gemini_api_key"

Frontend — create frontend/.env:

VITE_ASGARDEO_CLIENT_ID=your_asgardeo_client_id
VITE_ASGARDEO_BASE_URL=https://api.asgardeo.io/t/your_org
VITE_API_BASE_URL=http://localhost:9090

3. Set up the database

Run the following SQL in your Supabase SQL Editor to create the required table:

CREATE TABLE tasks (
  id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
  profile_id TEXT NOT NULL,
  title TEXT NOT NULL,
  description TEXT,
  category TEXT DEFAULT 'Work',
  priority TEXT DEFAULT 'Medium',
  is_completed BOOLEAN DEFAULT FALSE,
  task_date TIMESTAMPTZ,
  source TEXT DEFAULT 'web',
  created_at TIMESTAMPTZ DEFAULT NOW()
);

4. Start the application

Start the Backend (Ballerina):

cd backend
bal run

*The backend API will start on http://localhost:9090*

Start the Frontend (React):

cd frontend
npm install
npm run dev

*The frontend UI will start on http://localhost:5173*


Environment Variables Reference

Variable Location Description
supabaseUrl backend Your Supabase project URL
supabaseServiceKey backend Supabase Service Role Key (bypasses RLS for secure backend ops)
geminiApiKey backend Google AI Studio key for the Task Co-Pilot
VITE_ASGARDEO_CLIENT_ID frontend Asgardeo application client ID
VITE_ASGARDEO_BASE_URL frontend Asgardeo organization URL

API Endpoints

All endpoints are served by the Ballerina API Gateway on port 9090.

Method Endpoint Description
GET /tasks?profile_id={id} Fetch all tasks for a specific user
POST /tasks Create a new task
PUT /tasks/:id Update a task (e.g., mark as completed, edit details)
DELETE /tasks/:id Permanently delete a task
POST /ai/breakdown Send a task title to Gemini and return 3 actionable sub-tasks

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages