iqps-go
                                
                                 iqps-go copied to clipboard
                                
                                    iqps-go copied to clipboard
                            
                            
                            
                        Search for question papers when the library can't save you.
 
  
  IQPS
    Intelligent Question Paper Search
    
    Website
    ·
    Report Bug / Request Feature
    ·
    Backend Documentation
  
Table of Contents
- About The Project
- Development
- Deployment
- Environment Variables
 
- Contact
- Maintainer(s)
- Creator(s)
 
- Additional documentation
About The Project
 
IQPS is a platform for searching and uploading previous year question papers for IIT Kharagpur students. The frontend is deployed at https://qp.metakgp.org and the backend is hosted on a DigitalOcean droplet with 2GB RAM and a single CPU. See MetaPloy for the deployment architecture. IQPS was originally created by Shubham Mishra in python. You can find it here.
[!Note] Currently in active development. Get involved at our Slack.
Development
- Clone this repository.
- For starting the backend:
- Change directory to backend cd backend
- Make the env file by copying the template: cp .env.template .env
- Fill the env variable and set DB_HOST=localhostfor running locally for development
- Start the DB by running docker compose -f docker-compose.dev.yaml up -d
- Start the Rust backend by running cargo run .
 
- Change directory to backend 
- Set up the frontend by running pnpm installand thenpnpm startin thefrontend/directory.
- Profit.
Crawler
[WIP: Steps to locally set up crawler]
Deployment
Backend
- Set up MetaPloy for production.
- Clone this repository at a convenient location such as /deployments.
- cd backend/
- Set the appropriate production environment variables in the .envfile.
- Run docker compose upto start the backend.
- Optionally set up a Systemd service to start the wiki on startup or use this deployment github workflow.
Environment Variables
Environment variables can be set using a .env file. Use the .env.template files for reference. See backend/src/env.rs for more documentation and types.
Backend
Database (Postgres)
- DB_NAME: Database name
- DB_HOST: Database hostname (eg:- localhost)
- DB_PORT: Database port
- DB_USER: Database username
- DB_PASSWORD: Database password
Authentication
- GH_CLIENT_ID: Client ID of the Github OAuth app.
- GH_CLIENT_SECRET: Client secret of the Github OAuth app.
- GH_ORG_NAME: The name of the Github organization of the admins.
- GH_ORG_TEAM_SLUG: The URL slug of the Github org team of the admins.
- JWT_SECRET: A secret key/password for JWT signing. It should be a long, random, unguessable string.
Configuration
- MAX_UPLOAD_LIMIT: Maximum number of files that can be uploaded at once.
- LOG_LOCATION: The path to a local logfile.
- STATIC_FILES_URL: The URL of the static files server. (eg:- https://static.metakgp.org)
- STATIC_FILE_STORAGE_LOCATION: The path to the local directory from which the static files are served.
- UPLOADED_QPS_PATH: A path relative to- STATIC_FILE_STORAGE_LOCATIONwhere the uploaded question papers will be stored. (eg:- iqps/uploaded)
- LIBRARY_QPS_PATH: A path relative to- STATIC_FILE_STORAGE_LOCATIONwhere the library question papers are scraped and stored. (eg:- peqp/qp)
- SERVER_PORT: The port on which the server listens.
- CORS_ALLOWED_ORIGINS: A comma (,) separated list of origins to be allowed in CORS.
Frontend
- VITE_BACKEND_URL: The IQPS backend URL. Use- http://localhost:8080in development.
- VITE_MAX_UPLOAD_LIMITThe maximum number of files that can be uploaded at once. (Note: This is only a client-side limit)
- VITE_GH_OAUTH_CLIENT_IDThe Client ID of the Github OAuth app.
Contact
Maintainer(s)
The currently active maintainer(s) of this project.
Creator(s)
Honoring the original creator(s) and ideator(s) of this project.
(back to top)
Additional documentation
- License
- Code of Conduct
- Security Policy
- Contribution Guidelines
(back to top)