How rachitnaruzu/resultnotifier works
Project type and purpose
• This is a full-stack “ResultNotifier” system consisting of:
• An Android mobile client (Gradle/Android Studio)
• A Python backend (WSGI app behind nginx/uwsgi)
• A PostgreSQL database
• Scheduled jobs (cron) for scraping and updating data
• Push notifications via FCM/GCM
• Purpose: scrape/ingest university results, notices, schedules; store and surface them through a mobile UI; push real-time notifications to users.
File structure
• Top-level “app” directory: Android client
• src/main/java/com/resultnotifier/main/…
– ui (Activities, Fragments, Adapters)
– service (HTTP client wrappers)
– notification (FCM services)
– downloader, loader (data fetching abstractions)
– db (SQLite/DB manager)
– util, config, state classes
• build.gradle, AndroidManifest.xml, res/ (layouts, drawables, animators, values)
• Top-level “backend” directory: Python service
• config.py (settings)
• databaseutil.py (DB helpers)
• extractbeta.py (web-scrape fetcher)
• main.py, wsgi.py (WSGI entrypoints)
• notification.py, registration.py (push logic)
• seed.py, update_recent_viewed.py (initial data & trending updates)
• nginx/uwsgi config files, requirements.txt
• images/ for README screenshots
README insights
• Backend uses PostgreSQL, uWSGI & nginx, cron jobs scheduled via crontab
• Mobile uses GCM_API_KEY, SECRET_KEY matching backend for auth
• Workflow: seed DB → scrape new data → push via notification.py → update trending → mobile fetches via REST
Main components & interactions
a. Android Mobile App
• UI Layer (Activities/Fragments) ←→ Data Loader layer
• Service layer (CustomRequest, MyHTTPHandler) calls REST API
• Local storage (SQLite via DatabaseManager, SharedPreferences)
• FCM services (FCMMessagingService, token handling) receive push
b. Backend Web Service
• nginx → uWSGI → WSGI Python app (main.py/wsgi.py)
• REST endpoints (registration, fetch data) implemented in registration.py, main.py
• Business logic in notification.py, update_recent_viewed.py
• Database access via databaseutil.py to PostgreSQL
• extractbeta.py fetches raw data from external sources
c. External Services
• PostgreSQL database
• Google FCM/GCM push endpoint
d. Scheduled Jobs (cron)
• notification.py (hourly push)
• update_recent_viewed.py (every 5 minutes)
• extractbeta.py invoked from seed or cron to fetch new data
Architectural patterns & design principles
• Android client uses an MVC/MVP-style layering: UI ↔ Loaders ↔ Network Service ↔ Persistence
• Backend is a layered web application: HTTP routing → business logic → data access
• Asynchronous decoupling: scheduled jobs update DB and trigger notifications out-of-band from user requests
• Configuration-driven: config.py and CommonUtility.java both hold shared SECRET_KEY, domain, API keys
• Infra layering: nginx reverse proxy → uWSGI application server → Python WSGI