Built using Django REST Framework and React with multi-domain support.
This portal supports multiple independent domains under one platform:
- SOC (Summer of Code)
- SOQ (Summer of Quants)
- SOR (Summer of Robotics)
- And more...
- One User Account: Each user has ONE account across all domains
- Multiple Roles: Users can be mentor in SOC, mentee in SOQ, manager for all domains
- Domain Independence: Each domain has its own projects, mentors, mentees
- Centralized Management: Platform managers can create and manage all domains
- Bulk Project Import: Upload CSV/TSV/Excel files to import multiple projects at once
- Domain-Specific Project IDs: Each domain has its own project numbering (SOC #1, SOQ #1, etc.)
- Mentor Contact Info: Phone numbers visible on project pages for mentee communication
- Consistent Navigation: Quick access bar on all mentee portal pages
- CustomUser: Django auth user (one per roll number)
- UserProfile: Extended profile (name, roll, phone, year, department)
- Domain: Represents a tech domain (slug, name, description, permissions)
- DomainMembership: Links user to domain with role (mentor/mentee/manager)
- Project: Domain-scoped projects
- Mentor: Domain-scoped mentor profiles
- Mentee: Domain-scoped mentee profiles
- MenteeWishlist: Mentee's project wishlist
- MenteePreference: Mentee's project preferences with SOP
- RankList: Project-level mentee rankings (shared by all co-mentors)
- Python 3.8+
- Node.js 16+
- PostgreSQL (production) or SQLite (development)
- pnpm (recommended) or npm
cd socbackendpython -m venv venvWindows:
venv\Scripts\activateLinux/macOS:
source venv/bin/activatepip install -r requirements.txtFor Excel support in bulk import:
pip install openpyxlCopy .env.example to .env and configure:
SECRET_KEY=your-secret-key-here
DEBUG=True
DATABASE_URL=sqlite:///db.sqlite3
MANAGER_SECRET_TOKEN=your-manager-secret-token
EMAIL_HOST_USER=your-email@example.compython manage.py makemigrations
python manage.py migratepython manage.py loaddata data2.jsonpython manage.py createsuperuserpython manage.py runserverBackend will be available at: http://127.0.0.1:8000
cd socfrontendnpm install -g pnpmpnpm installCopy .env.example to .env and configure:
REACT_APP_BACKEND_URL=http://127.0.0.1:8000/api
REACT_APP_API_URL=http://127.0.0.1:8000pnpm startFrontend will be available at: http://localhost:3000
Dump all data:
python manage.py dumpdata > data.jsonDump specific apps only (recommended):
python manage.py dumpdata accounts domains projects --indent 2 > data.jsonExclude sensitive data:
python manage.py dumpdata --exclude auth.permission --exclude contenttypes --indent 2 > data.jsonExclude sessions (recommended):
python manage.py dumpdata --exclude sessions --exclude admin.logentry --indent 2 > data.jsonAfter running migrations:
python manage.py loaddata data.json- Dump data without sessions and logs:
python manage.py dumpdata accounts domains projects --exclude sessions --exclude admin.logentry --indent 2 > data.json- Commit
data.jsonto repository - New contributors can load it after migrations
git clone <repository-url>
cd soc_portalcd socbackend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
python manage.py migrate
python manage.py loaddata data.json # Load sample data
python manage.py runservercd socfrontend
pnpm install
pnpm start- Frontend:
http://localhost:3000 - Backend API:
http://127.0.0.1:8000/api - Admin Panel:
http://127.0.0.1:8000/admin
- Access: All domains
- Permissions:
- Create/edit/delete domains
- Approve mentor applications
- Manage members
- Toggle project creation/editing permissions
- How to become: Visit
/become-manager/<secret-token>(token set in .env)
- Access: Specific domain(s)
- Permissions: Same as platform manager but for assigned domains only
- Access: Specific domain(s)
- Permissions:
- Create projects (if enabled by manager)
- Edit projects (if enabled by manager)
- View mentee applications
- Rank mentees
- Manage project mentees
- Access: Specific domain(s)
- Permissions:
- Browse projects
- Add projects to wishlist
- Submit project preferences with SOP
/- Home page with domain cards/login- SSO login
/manager- Manager dashboard/become-manager/:secret- Manager bootstrap URL
/:domain/current_projects- Browse projects/:domain/current_projects/:id- Project details/:domain/wishlist- View wishlist/:domain/PreferenceForm- Submit preferences
/:domain/mentor/home- Mentor dashboard/:domain/mentor/add-project- Create new project/:domain/mentor/edit-project- Edit existing project
/current_projects- Works if user has only one mentee membership/mentor/home- Works if user has only one mentor membership
POST /api/accounts/register_sso/- Register via SSOPOST /api/accounts/token_sso/- Get auth tokenGET /api/accounts/isloggedin/- Check login statusGET /api/accounts/my-memberships/- Get user's memberships
GET /api/domains/- List active domains (public)POST /api/domains/- Create domain (managers only)GET /api/domains/<slug>/- Domain detailPATCH /api/domains/<slug>/- Edit domain (managers only)GET /api/domains/<slug>/projects/- List domain projects
GET /api/domains/<slug>/members/- List members (managers only)POST /api/domains/<slug>/members/- Apply for membershipPATCH /api/domains/<slug>/members/<id>/- Approve membership (managers only)
GET /api/projects/?domain=<slug>- List projects for domainGET /api/projects/<id>/- Project detail (includesdisplay_id,mentor_details,co_mentor_details)POST /api/projects/mentor/profile/- Create project (mentor)PUT /api/projects/mentor/profile/<id>/- Edit project (mentor)
GET /api/projects/wishlist/?domain=<slug>- Get wishlistPOST /api/projects/wishlist/- Add to wishlistDELETE /api/projects/wishlist/?project_id=X&domain=slug- Remove from wishlistGET /api/projects/preference/?domain=<slug>- Get preferencesPOST /api/projects/preference/- Submit preference
- Access via Django Admin β Domains β Bulk Import button
- Supports CSV, TSV, XLSX, XLS file formats
- Auto-creates projects and links mentors
Access interactive API docs:
- Swagger UI:
http://127.0.0.1:8000/swagger/ - ReDoc:
http://127.0.0.1:8000/redoc/
Generate component documentation using Storybook:
cd socfrontend
npm install --save-dev @storybook/react
npx sb init
npx storybookGenerate Sphinx documentation:
cd socbackend/docs
./make.bat html # Windows
make html # Linux/macOSOpen socbackend/docs/_build/html/index.html in browser
- Login and navigate to
/manager - Click "New Domain"
- Fill in details:
- Slug:
soq(unique identifier) - Name:
Summer of Quants - Description: Domain description
- Upload cover photo
- Slug:
- Toggle registration settings:
- β Mentee Registration Open
- β Mentor Registration Open
- Toggle project permissions:
- β Allow mentors to create projects
- β Allow mentors to edit projects
- Save
- Go to Django Admin β Domains
- Click "π Bulk Import" button next to target domain
- Choose import method:
- Option 1: Upload CSV/TSV/Excel file
- Option 2: Paste spreadsheet data
- Click "Import Projects"
- Review results:
- β Success count
β οΈ Warnings (e.g., mentor not found - project still created)
- Projects appear with domain-specific IDs (e.g., SOC #1, SOC #2)
Template Format:
title,mentee_max,mentor,co_mentors,description
AI Chatbot,3,John Doe (21b1234),Alice (21b5678),Build a chatbot
Web3 DApp,2,Sarah (21b3456),NA,Create a DAppDocumentation:
socbackend/projects/TEMPLATE.csv- CSV templatesocbackend/projects/TEMPLATE.tsv- TSV templatesocbackend/projects/BULK_IMPORT_GUIDE.md- Complete guidesocbackend/projects/QUICK_REFERENCE.md- Quick reference
- Login via SSO
- Click on domain card (e.g., "Summer of Code")
- Click "Apply as Mentor"
- Wait for manager approval
- Once approved, access mentor portal via "My Domains" dropdown
- Login via SSO
- Click on domain card (e.g., "Summer of Code")
- Click "Register as Mentee" (auto-approved)
- Redirected to
/soc/current_projects - Browse projects, add to wishlist, submit preferences
- Navigate to
/:domain/mentor/home - Click "Add Project" card (only visible if creation is enabled)
- Fill project details:
- Title, category, description
- Number of mentees
- Co-mentors (optional)
- Timeline, checkpoints, prerequisites
- Banner image link
- Submit
- Navigate to
/:domain/mentor/home - Click on a project card
- View list of mentees who applied
- Drag and drop to rank mentees
- Save ranklist
- Note: Co-mentors see and share the same ranklist
Migration conflicts:
python manage.py makemigrations --merge
python manage.py migrateDatabase locked (SQLite):
# Stop all Django processes
# Delete db.sqlite3
python manage.py migrate
python manage.py loaddata data.jsonModule not found:
pip install -r requirements.txtPort already in use:
# Kill process on port 3000 (Windows)
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# Kill process on port 3000 (Linux/macOS)
lsof -ti:3000 | xargs kill -9Dependencies not installing:
rm -rf node_modules package-lock.json
pnpm installEnvironment variables not loading:
- Ensure
.envfile exists insocfrontend/ - Restart development server after changing
.env
- Set
DEBUG=Falsein backend.env - Use PostgreSQL instead of SQLite
- Set strong
SECRET_KEYandMANAGER_SECRET_TOKEN - Configure CORS properly
- Use HTTPS
- Set up proper authentication (SSO)
- Never commit
.envfiles to Git
.envfiles are in.gitignoredata.jsonshould NOT contain real user passwords- Manager secret tokens should be rotated regularly
- Run migrations and ensure no conflicts
- Test all affected features
- Update documentation if needed
- Follow code style guidelines
- Write meaningful commit messages
- Backend: Follow PEP 8 (Python)
- Frontend: Follow Airbnb React/JSX Style Guide
- Use meaningful variable names
- Add comments for complex logic
- Write docstrings for functions
- Backend migrations apply cleanly
- Frontend builds without errors
- All API endpoints work with domain parameter
- Domain-scoped routes navigate correctly
- URLGuard properly restricts access
- Manager dashboard functions work
- Mentor portal shows correct permissions
- Mentee portal shows domain-specific projects
For issues and questions:
- Create an issue on GitHub
- Contact Web and Coding Club, IIT Bombay
- Check existing documentation in
/docsfolder
This project is maintained by the Web and Coding Club, IIT Bombay.
- TTY17 - Original SoC Portal creators
- HelloFOSS '24 - Contributing community
- Web and Coding Club, IIT Bombay - Project maintainers
soc_portal/
βββ socbackend/ # Django REST Framework backend
β βββ accounts/ # User authentication & profiles
β βββ domains/ # Domain management
β β βββ admin.py # Includes bulk import action
β β βββ templates/ # Bulk import form template
β βββ projects/ # Projects, mentors, mentees
β β βββ bulk_import.py # Bulk import logic
β β βββ TEMPLATE.csv # CSV template
β β βββ TEMPLATE.tsv # TSV template
β β βββ BULK_IMPORT_GUIDE.md
β β βββ QUICK_REFERENCE.md
β β βββ TEMPLATES_SUMMARY.md
β βββ socbackend/ # Django settings
β βββ manage.py
β βββ requirements.txt
β βββ data.json # Sample data dump
β
βββ socfrontend/ # React frontend
β βββ public/
β βββ src/
β β βββ components/ # Shared components
β β βββ home/ # Home page & domain cards
β β βββ manager/ # Manager dashboard
β β βββ mentor/ # Mentor portal
β β βββ mentee/ # Mentee portal (with navigation bar)
β β β βββ pages/
β β β β βββ Projects.jsx # Shows mentor phone numbers
β β β β βββ Wishlist.jsx # With navigation bar
β β β β βββ PreferenceForm.jsx # With navigation bar
β β β β βββ ProjectDetails.jsx # Shows domain project ID
β β βββ utils/ # API utilities
β β βββ App.js # Main app with routing
β β βββ URLGuard.js # Route protection
β βββ package.json
β βββ .env.example
β
βββ README.md # Original README
βββ README2.md # This comprehensive guide
βββ CONTRIBUTING.md # Contribution guidelines
# Backend
cd socbackend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py loaddata data3.json
python manage.py runserver
# Frontend (new terminal)
cd socfrontend
pnpm install
pnpm start
# Access
# Frontend: http://localhost:3000
# Backend: http://127.0.0.1:8000Happy coding! π