A production-ready mobile event management platform for educational institutions, built with React Native (Expo) and Node.js.
- Installation Guide - Local setup for backend & frontend
- API Reference - Complete API documentation with examples
- Environment Variables - All configuration options explained
- Database Schema - Data model & relationships
- Production Features - Caching, optimization, resilience
- Deployment Guide - Deploy to production (Render, Docker, etc.)
- Troubleshooting - Common issues & solutions
- GitHub Repository: https://github.com/MAYANKSHARMA01010/campus_connect
- Live Backend: https://campus-connect-asps.onrender.com
- Author Portfolio: https://mayank-sharma-personal-portfolio.vercel.app
- Event Discovery: Browse, search, and filter campus events
- Event Hosting: Submit events for admin approval with images
- My Events: Track submitted events and approval status
- Profile Management: Update personal information
- Offline Mode: Access cached events without internet
- Event Management: Approve, reject, or delete events
- User Management: View all registered users
- Dashboard: Monitor pending/approved/rejected events
- Analytics: Track event submissions and statistics
- 3-Tier Caching: Redis SWR + In-memory + AsyncStorage (offline)
- Fast Search: Trigram indexing for typo-tolerant search
- Cursor Pagination: Efficient list loading (always O(1))
- Circuit Breaker: Graceful degradation under failure
- Health Monitoring: Automated server health checks
- Slow Query Detection: Real-time performance monitoring
| Layer | Technology |
|---|---|
| Frontend | React Native, Expo, React Navigation, React Native Paper |
| Backend | Node.js, Express.js, Prisma ORM |
| Database | PostgreSQL + Redis (optional) |
| Image Upload | Cloudinary CDN |
| Authentication | JWT (jsonwebtoken) |
| Password Hashing | bcrypt |
- Download Expo Go from App Store or Google Play
- Scan QR Code from development server
- Create Account and start exploring events
Installation & Setup:
# Clone repository
git clone https://github.com/MAYANKSHARMA01010/campus_connect.git
cd campus_connect
# Backend setup
cd backend
pnpm install
pnpm build
# Configure .env (see INSTALLATION.md)
pnpm run dev
# Frontend setup (new terminal)
cd frontend
pnpm install
pnpm startBase URL:
http://localhost:5001/api
Key Endpoints:
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/user/register |
Create account |
POST |
/user/login |
Authenticate |
GET |
/events |
List all events (paginated) |
GET |
/events/search |
Search events (trigram) |
GET |
/events/home |
Home screen (precomputed) |
POST |
/events/request |
Submit event for approval |
PATCH |
/events/admin/:id/status |
Approve/reject (admin) |
Complete API Documentation β
Three main tables:
- Users - Account information (name, email, password, role)
- EventRequests - Event submissions (title, status, images)
- EventImages - Cloudinary image URLs (cascade delete)
Optimizations:
- Trigram indexes for fast text search
- Partial indexes (APPROVED events only)
- Cursor pagination (O(1) performance)
- Cascade deletes for data integrity
Campus Connect includes 15+ hardening features for production:
β Caching: 3-tier strategy (Redis, in-memory, AsyncStorage) β Resilience: Circuit breaker, timeouts, graceful degradation β Optimization: Indexes, cursor pagination, payload splitting β Monitoring: Slow query detection, health checks, request tracking β Offline: Full mobile app functionality without internet β Security: JWT auth, bcrypt hashing, CORS protection
Learn More About Production Features β
Recommended:
- Backend: Render.com (free tier available)
- Database: PostgreSQL on Render
- Cache: Redis on Render (optional)
- Frontend: Expo EAS Build β App Store/Play Store
Step-by-Step Deployment Guide β
All features configurable via environment variables:
# Backend cache TTL (in milliseconds)
CACHE_TTL_EVENTS=45000
CACHE_STALE_EVENTS=90000
# Database protection
DB_TIMEOUT_MS=7000
DB_CIRCUIT_BREAKER_THRESHOLD=5
# Performance monitoring
SLOW_QUERY_THRESHOLD_MS=250
# Optional
REDIS_URL=redis://localhost:6379
ALERT_WEBHOOK_URL=https://your-webhook.comComplete Environment Variables Reference β
Common Issues:
| Problem | Solution |
|---|---|
| "Cannot find module" | pnpm install |
| Database connection failed | Check PostgreSQL running + DATABASE_URL |
| Redis error | Optional - gracefully falls back to in-memory |
| API connection from mobile | Use local network IP, not localhost |
| Image upload fails | Check Cloudinary credentials in .env |
Full Troubleshooting Guide β
We welcome contributions!
How to contribute:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m "feat: add amazing feature" - Push:
git push origin feature/amazing-feature - Open Pull Request
Development Standards:
- Use async/await (no callbacks)
- Write meaningful commit messages
- Test thoroughly before submitting PR
- Follow existing code patterns
campus_connect/
βββ backend/ # Node.js + Express API
β βββ src/
β β βββ server.js # Entry point
β β βββ config/ # Configuration
β β βββ controllers/ # Request handlers
β β βββ routes/ # API routes
β β βββ middlewares/ # Custom middleware
β β βββ services/ # Business logic
β β βββ utils/ # Utilities
β β βββ monitor/ # Health monitoring
β βββ prisma/ # Database schema
β βββ package.json
β
βββ frontend/ # React Native + Expo
β βββ Screens/ # Application screens
β βββ components/ # Reusable components
β βββ hooks/ # Custom React hooks
β βββ api/ # API service layer
β βββ context/ # State management
β βββ navigation/ # Navigation setup
β βββ theme/ # Styling
β βββ package.json
β
βββ docs/ # Documentation
β βββ INSTALLATION.md
β βββ API.md
β βββ DATABASE.md
β βββ ENVIRONMENT_VARIABLES.md
β βββ PRODUCTION_FEATURES.md
β βββ DEPLOYMENT.md
β βββ TROUBLESHOOTING.md
β βββ CONTRIBUTING.md
β
βββ README.md # This file
Mayank Sharma
| Link | URL |
|---|---|
| π Portfolio | https://mayank-sharma-personal-portfolio.vercel.app |
| π§ Email | sharmamayank01010@gmail.com |
| π GitHub | https://github.com/MAYANKSHARMA01010 |
| π± Project | https://github.com/MAYANKSHARMA01010/campus_connect |
This project is licensed under the MIT License - see LICENSE file for details.
You are free to:
- Use this code for personal and commercial projects
- Modify and distribute the code
- Use private copies
You must:
- Include the original license notice
- Document significant changes
- React Native & Expo teams for excellent documentation
- Prisma for the amazing ORM experience
- PostgreSQL for powerful database features
- React Navigation for seamless navigation
- React Native Paper for beautiful UI components
- Issues: GitHub Issues
- Email: sharmamayank01010@gmail.com
- Discussions: GitHub Discussions
Made with β€οΈ for campus communities worldwide
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | Mar 31, 2026 | Initial release with production features |
| 0.9.0 | Mar 15, 2026 | Beta testing phase |
| 0.1.0 | Feb 1, 2026 | Initial development |