A study tool with user authentication, AI-powered flashcards, and a typing speed test. This was done for a university mini project.
- User Authentication: Secure login/signup system with Google Sheets backend
- Flashcard App: Upload PDFs and generate AI-powered study questions
- Typing Test: Test your typing speed with real-time feedback
- Python 3.8+
- Ollama - Download here
- Google Cloud Account - For authentication backend
-
Clone the repository
git clone https://github.com/kunjsinha/flash-learn.git cd flash-learn -
Install dependencies
pip install streamlit pymupdf requests gspread google-auth
-
Setup Ollama
ollama pull llama3.2
-
Setup Google Sheets Authentication
a. Create a Google Cloud Project and enable Google Sheets API
b. Create a Service Account and download the JSON credentials
c. Create a Google Sheet named "users" with columns:
username|passwordd. Share the sheet with your service account email
e. Create
.streamlit/secrets.tomlwith your credentials:[google] type = "service_account" project_id = "your-project-id" private_key_id = "your-private-key-id" private_key = "your-private-key" client_email = "your-service-account-email" 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 = "your-cert-url"
-
Start Ollama (if not already running)
ollama serve
-
Run the app
python app.py
-
Open your browser to
http://localhost:8501 -
Login or Sign Up to access the dashboard
app.py- Application launcherloginui.py- Login/signup pagedashboard.py- Main dashboard (protected)pages/flashcard_ui.py- Flashcard generator (protected)pages/typing_test.py- Typing speed test (protected)ai.py- AI question generationpdf_reader.py- PDF text extractionwordgetter.py- Word list utilitieswordsdataset.txt- Word list for typing test.streamlit/secrets.toml- Google Cloud credentials (not in repo)
- Keep
.streamlit/secrets.tomlprivate and never commit it to version control - The Google Sheet should only be shared with your service account