A modern Progressive Web App for documenting your learning journey with a creative canvas, built with Flask and vanilla JavaScript.
- Learning Journal β Create, read, update, and delete journal entries with rich metadata
- Projects Showcase β Display and manage your portfolio of projects
- About Page β Personal profile with stats and social links
- Dark/Light Theme β Toggle between themes with persistent preference storage
A fully featured drawing interface for visual reflections:
- Drawing Tools β Brush, line, rectangle, circle, and eraser
- Color Picker β Full color palette with opacity control
- History Management β Undo/Redo functionality
- Image Filters β Grayscale, sepia, blur, and brightness adjustments
- Export Options β Save drawings as PNG images
- Installable β Add to home screen on mobile devices and desktop
- Offline Support β Service Worker caches key resources for offline access
- Native-like Experience β Standalone display mode with custom theme color
Full CRUD API for journal reflections:
| Method | Endpoint | Description |
|---|---|---|
GET |
/reflections |
Retrieve all journal entries |
POST |
/add_reflection |
Create a new entry |
PUT |
/reflection/<id> |
Update an existing entry |
DELETE |
/reflection/<id> |
Delete an entry |
Vanshika Project/
βββ flask_app.py # Main Flask application (routes + API)
βββ wsgi_config.py # WSGI configuration for deployment
βββ requirements.txt # Python dependencies
β
βββ templates/ # Jinja2 HTML templates
β βββ index.html # Home page
β βββ journal.html # Journal entries page
β βββ projects.html # Projects showcase
β βββ about.html # About/profile page
β βββ canvas.html # Creative canvas dashboard
β
βββ static/
β βββ css/
β β βββ styles.css # Main stylesheet (51KB)
β β βββ canvas.css # Canvas-specific styles
β β
β βββ js/
β β βββ script.js # Main application logic
β β βββ journal.js # Journal CRUD operations
β β βββ storage.js # LocalStorage abstraction
β β βββ browser.js # Browser feature detection
β β βββ thirdparty.js # Third-party integrations
β β βββ sw.js # Service Worker for PWA
β β βββ canvas.js # Canvas main controller
β β βββ canvas-tools.js # Drawing tools implementation
β β βββ canvas-drawing.js # Drawing logic
β β βββ canvas-color.js # Color picker functionality
β β βββ canvas-filters.js # Image filter effects
β β βββ canvas-history.js # Undo/Redo management
β β βββ canvas-storage.js # Canvas save/load
β β βββ canvas-toolbar.js # Toolbar UI
β β βββ canvas-greeting.js # Greeting messages
β β βββ about.js # About page logic
β β
β βββ img/ # Images and icons
β βββ manifest.json # PWA manifest
β βββ offline.html # Offline fallback page
β
βββ backend/
β βββ reflections.json # JSON database for entries
β βββ api.py # Alternative API module
β βββ save_entry.py # Entry saving utilities
β
βββ deploy.sh # PythonAnywhere deployment script
βββ auto_install.py # Automated dependency installer
βββ install_dependencies.sh # Shell script for dependencies
βββ ASSIGNMENT_ANSWERS.md # Project documentation/answers
- Python 3.11 or higher (3.13 recommended)
- pip (Python package manager)
-
Clone/Download the repository
cd "Vanshika Project"
-
Create a virtual environment (recommended)
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
Or use the automated installer:
python auto_install.py
-
Run the application
python flask_app.py
-
Open in browser Navigate to http://localhost:5000
This project is designed for easy deployment on PythonAnywhere:
- Upload all project files to your PythonAnywhere account
- Run the deployment script:
bash deploy.sh
- Configure your web app to point to
flask_app.py - Set the WSGI configuration file to use
wsgi_config.py
For detailed deployment instructions, see INSTALL_FOR_PYTHON313.txt.
The Flask app includes robust CORS handling with a fallback mechanism:
try:
from flask_cors import CORS
CORS(app)
except ImportError:
# Manual fallback CORS headers
@app.after_request
def after_request(response):
response.headers.add('Access-Control-Allow-Origin', '*')
# ... more headersUses os.path for cross-platform compatibility:
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
JSON_FILE = os.path.join(BASE_DIR, 'backend', 'reflections.json')Implements offline-first strategy for core assets:
- HTML pages
- CSS stylesheets
- JavaScript files
- Static images
{
"id": "uuid-string",
"weekOfJournal": 1,
"journalName": "Week 1 - Getting Started",
"journalDate": "2025-01-23",
"taskName": "Setting Up Development Environment",
"taskDescription": "Detailed description of what was learned...",
"technologies": ["Python", "Flask", "JavaScript"],
"timestamp": "2025-01-23T01:30:00.000Z",
"updatedAt": "2025-01-23T02:00:00.000Z"
}- SQLite/PostgreSQL database integration
- User authentication with Flask-Login
- Cloud storage for canvas drawings
- Enhanced search and filtering
- Export journal as PDF
| Category | Technologies |
|---|---|
| Backend | Python, Flask, Flask-CORS |
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| PWA | Service Workers, Web Manifest |
| Canvas | HTML5 Canvas API |
| Storage | JSON file + localStorage |
| Styling | CSS Variables, Glassmorphism, Dark Mode |
Vanshika Tangri
Web Developer & Lifelong Learner
This project is created as part of a learning assignment. Feel free to use it as a reference for your own projects.
Built with β€οΈ by Vanshika Tangri | Β© 2025 LearnJournal