Educative Viewer is an offline-first learning companion for extracting, organizing, and viewing educational content with a clean developer-focused workflow.
Live Guide: https://educative-viewer-guide.vercel.app/
View Project: https://github.com/Biraj2004/EducativeViewer/
This guide shows how to run the app on your computer (Windows).
It covers:
- Backend (Flask)
- Frontend (Next.js)
- Local reverse proxy (Nginx or Apache)
- Serving images through the local proxy
Install these first:
- Node.js 18+
- Python 3.10+
- Nginx or Apache (only if you want local proxy routing)
client/: Next.js frontendserver/: Flask backendproxy/: Ready-to-use Nginx/Apache config files
Open PowerShell in the project root, then run:
cd server
# If you do not have a virtual environment yet:
python -m venv env
# Activate virtual environment:
.\env\Scripts\Activate.ps1
# Install backend dependencies:
pip install -r requirements.txt
# Create .env from sample:
Copy-Item .env.example .envOpen server/.env and set at least these values:
FLASK_PORT=5000
FLASK_DEBUG=1
AUTH_DB_ENGINE=sqlite
AUTH_SQLITE_DB_PATH=/path/to/your/auth.sqlite3
COURSE_DB_ENGINE=sqlite
COURSE_SQLITE_DB_PATH=/path/to/your/course_db.sqlite3
JWT_SECRET=change-this-for-local-dev
INVITE_CODES=localcodeNotes:
AUTH_SQLITE_DB_PATHis for user/auth data. The SQLite file is created if it does not exist.COURSE_SQLITE_DB_PATHshould point to your course database file.- Leave Oracle values in
.envuntouched if you are using SQLite.
Start backend:
python app.pyKeep this terminal running.
Open a second PowerShell terminal:
cd client
Copy-Item .env.local.example .env.localOpen client/.env.local and set:
NEXT_PUBLIC_BACKEND_API_BASE=http://localhost/
NEXT_PUBLIC_STATIC_FILES_BASE=http://localhost/
VERCEL_ENV=developmentIf your backend logs show an RSA private/public key message, copy the public key value to:
NEXT_PUBLIC_RSA_PUBLIC_KEY=your-public-key-hereStart frontend:
node deploy.jsThen choose one of these options from the menu:
2: Download zip from GitHub Releases + run locally4: Run locally (uses existing.next.zip)
Frontend runs on: http://localhost:3000
Use this when you want one local URL that:
- Sends real backend API routes to Flask
- Serves image/static files from local disk under
/api - Sends everything else to Next.js
- Use config: proxy/nginx-windows.conf
- If your main
nginx.confalready has a defaultserver { ... }block on port 80, comment/remove it before using this project server block. - Keep only one active
localhost:80server block for this app, otherwise Nginx may serve the wrong site. - In the file, confirm these values:
server_name localhost;
root C:/inetpub/wwwroot/educativeviewer;
# Flask upstream: 127.0.0.1:5000
# Next upstream: 127.0.0.1:3000- Create local static folder:
C:/inetpub/wwwroot/educativeviewer/api/images
- Put image files there, for example:
C:/inetpub/wwwroot/educativeviewer/api/images/logo.png
- Test and reload Nginx:
nginx -t
nginx -s reload- Use config: proxy/apache-windows.conf
- If your main Apache config already has a default
<VirtualHost *:80>for localhost, disable/comment it when enabling this project vhost. - Keep only one active
localhost:80vhost for this app, otherwise requests may go to the wrong virtual host. - Confirm
Aliaspath points to:
C:/inetpub/wwwroot/educativeviewer/api/
- Put images in:
C:/inetpub/wwwroot/educativeviewer/api/images
- Test and restart Apache:
httpd -t
httpd -k restart- Start backend in
server/:
python app.py- Start frontend in
client/:
node deploy.jsChoose option 2 or option 4.
- Start or reload Nginx/Apache with the proxy config.
- Open:
http://localhost
Use http://localhost (proxy) instead of http://localhost:3000 when testing full local routing.
After adding logo.png to:
C:/inetpub/wwwroot/educativeviewer/api/images/logo.png
Open this URL in your browser:
http://localhost/api/images/logo.png
If the image opens, local proxy image serving is working.
- Confirm backend is running on port
5000. - Confirm
NEXT_PUBLIC_BACKEND_API_BASE=http://localhost/inclient/.env.local.
- Use
node deploy.jsinstead ofnpm install/npm run dev. - In the menu, choose option
2or4for local run.
- Confirm file exists under
C:/inetpub/wwwroot/educativeviewer/api/.... - Confirm proxy root/alias paths match your real folder.
- Change the port in config and matching env values.
Once all three services are running, use http://localhost as your main local app URL.