Offline-first Computer Science App

CS Companion

A flagship offline-first learning platform for Punjab Board Computer Science students. It features a dual-book architecture, an AI study assistant, offline SQLite persistence, and a PDF paper generator.

  • React Native
  • Expo
  • TypeScript
  • Zustand
  • AsyncStorage
  • Flask
  • Groq AI
  • SQLite
Screenshot

Project Overview

Platform

Mobile App

Frontend

React Native, Expo, Zustand

Database

SQLite, AsyncStorage

Backend / AI

Flask, Groq AI

The Problem

Computer Science students in Punjab often lack access to interactive, offline-available study materials. Existing apps require constant internet connection and lack localized board-specific content like exercises and tailored MCQs.

The Solution

I built CS Companion as an offline-first learning platform. It integrates complete Punjab Board textbooks (Class 11 and 12) with SQLite databases for instantaneous offline access. It features an AI Study Assistant for personalized help, a built-in Python IDE, and a powerful PDF Paper Generator for teachers.

Key Features

Dual-Book Architecture

Dedicated SQLite databases for Class 11 and 12, covering chapters, exercises, and MCQs.

AI Study Assistant

Computer Science-focused AI chatbot powered by Groq, with persisted chat history.

PDF Paper Generator

Offline generation of custom examination papers in Board format directly to A4 PDFs.

Python IDE

Built-in Python learning platform with coding exercises, auto-save, and saved programs.

Architecture


React Native & Expo (UI & State via Zustand)
↓
SQLite (Dual-Book Offline Data) & AsyncStorage
↓
Flask API (Backend Services)
↓
Groq AI (Study Assistant)
↓
Expo (Build & Native Modules)
↓
SQLite (Fast Offline Operational Data)
↓
Firebase Auth & Firestore (Cloud Sync & Backup)

Engineering Challenges

Offline-First Large Dataset

Challenge: Managing the extensive textbook data, MCQs, and progress states purely offline without degrading app performance.

Solution: Implemented a dual-book SQLite architecture that lazy-loads board data, alongside optimized WebP textbook rendering with dynamic page mapping and zooming.

On-Device PDF Generation

Challenge: Teachers needed to generate A4 format examination papers without requiring an internet connection.

Solution: Built a custom offline PDF paper generator using React Native print modules, transforming SQLite queries directly into beautifully formatted board-style exam documents.

Results & Learnings

CS Companion is the culmination of robust offline architecture, AI integration, and user-centric design. It serves as a comprehensive educational tool, showcasing my ability to manage complex local states (Zustand, SQLite) and integrate advanced external APIs (Groq).