Skip to content

Repository files navigation

⚡ StudySprint AI

A gamified study productivity mobile app built with React Native (Expo), Firebase, and OpenAI. Helps students focus, track progress, review flashcards, and get AI tutoring.


📱 Features

Feature Description
🍅 Pomodoro Timer Circular focus timer with short/long breaks, background support
Task Manager Priority-based tasks with subjects, due dates, and completion tracking
🃏 Flashcards Spaced-repetition decks with AI-generated cards and flip animations
🤖 AI Tutor GPT-4o-mini powered chat — explain concepts, quiz, study plans
📊 Stats Dashboard Weekly charts, XP, levels, streaks, and achievement badges
🔥 Gamification XP system, level progression, streaks, and achievements
🔐 Auth Firebase Email/Password authentication with persistent sessions

🛠 Tech Stack

  • React Native (Expo SDK 51, Expo Router v3)
  • TypeScript (strict mode)
  • Firebase (Auth + Firestore)
  • Zustand (global state with persistence)
  • OpenAI SDK (gpt-4o-mini streaming)
  • React Navigation (via Expo Router file-based routing)

🚀 Quick Start

1. Clone and install

git clone https://github.com/YOUR_USERNAME/studysprint.git
cd studysprint
npm install

2. Set up environment variables

cp .env.example .env

Edit .env with your Firebase and OpenAI credentials:

EXPO_PUBLIC_FIREBASE_API_KEY=your_key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
EXPO_PUBLIC_FIREBASE_APP_ID=your_app_id

EXPO_PUBLIC_OPENAI_API_KEY=sk-...
EXPO_PUBLIC_OPENAI_MODEL=gpt-4o-mini

3. Set up Firebase

  1. Create a project at console.firebase.google.com
  2. Enable Authentication → Email/Password
  3. Enable Firestore Database (start in production mode)
  4. Deploy security rules:
npm install -g firebase-tools
firebase login
firebase init firestore
firebase deploy --only firestore:rules,firestore:indexes

4. Add assets

Place required images in assets/:

  • icon.png (1024×1024)
  • splash.png (1284×2778)
  • adaptive-icon.png (1024×1024)
  • favicon.png (32×32)

Run ./assets/generate-placeholders.sh for development placeholders.

5. Start the app

npx expo start
  • Press i for iOS Simulator
  • Press a for Android Emulator
  • Scan QR code with Expo Go app for physical device

📁 Project Structure

StudySprint/
├── app/                        # Expo Router screens
│   ├── _layout.tsx             # Root layout + auth init
│   ├── index.tsx               # Auth redirect
│   ├── (tabs)/                 # Tab navigator
│   │   ├── _layout.tsx         # Tab bar
│   │   ├── index.tsx           # Dashboard
│   │   ├── timer.tsx           # Pomodoro timer
│   │   ├── tasks.tsx           # Task manager
│   │   ├── flashcards.tsx      # Flashcard decks
│   │   └── ai.tsx              # AI assistant home
│   ├── auth/                   # Auth screens
│   ├── ai/                     # AI chat screen
│   ├── flashcards/             # Deck + study screens
│   ├── tasks/                  # Create/edit task
│   └── profile/                # Settings + stats
├── src/
│   ├── types/index.ts          # All TypeScript types
│   ├── theme/index.ts          # Design tokens
│   ├── services/               # Firebase + OpenAI services
│   ├── stores/                 # Zustand state stores
│   ├── hooks/                  # Custom React hooks
│   ├── components/             # Reusable UI components
│   └── utils/                  # Formatters, constants, helpers
├── assets/                     # Images and icons
├── firestore.rules             # Firestore security rules
├── firestore.indexes.json      # Composite indexes
└── firebase.json               # Firebase project config

🔐 Security Notes

  • Never commit .env — it's in .gitignore
  • OpenAI API key is exposed client-side; for production consider a backend proxy
  • Firestore rules enforce per-user data isolation
  • All write operations validate field types and sizes

🧪 Development Tips

# Type check
npm run type-check

# Lint
npm run lint

# Clear Expo cache
npx expo start --clear

# Firebase local emulators
firebase emulators:start

📦 Building for Production

# Install EAS CLI
npm install -g eas-cli
eas login

# Configure
eas build:configure

# Build for iOS
eas build --platform ios

# Build for Android
eas build --platform android

🤝 Contributing

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Commit: git commit -m "feat: add my feature"
  4. Push: git push origin feat/my-feature
  5. Open a Pull Request

📄 License

MIT © StudySprint Team

About

A React Native study productivity mobile app with AI assistant, Pomodoro timer, flashcards, and task manager

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages