Skip to content

MAYANKSHARMA01010/campus_connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

244 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Campus Connect πŸŽ“

A production-ready mobile event management platform for educational institutions, built with React Native (Expo) and Node.js.

GitHub License Version


🎯 Quick Links

πŸ“š Documentation

πŸ”— Project Links


✨ Key Features

πŸ‘₯ For Users

  • 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

πŸ‘¨β€πŸ’Ό For Admins

  • 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

βš™οΈ System Features

  • 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

πŸ›  Tech Stack

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

πŸš€ Getting Started

For Users (Testing the App)

  1. Download Expo Go from App Store or Google Play
  2. Scan QR Code from development server
  3. Create Account and start exploring events

For Developers

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 start

Detailed Setup Guide β†’


πŸ“‘ API Overview

Base 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 β†’


πŸ—„ Database

Three main tables:

  1. Users - Account information (name, email, password, role)
  2. EventRequests - Event submissions (title, status, images)
  3. 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

Database Schema Details β†’


⚑ Production Features

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 β†’


🌍 Deployment

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 β†’


πŸ”§ Configuration

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.com

Complete Environment Variables Reference β†’


πŸ› Troubleshooting

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 β†’


🀝 Contributing

We welcome contributions!

How to contribute:

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m "feat: add amazing feature"
  4. Push: git push origin feature/amazing-feature
  5. Open Pull Request

Development Standards:

  • Use async/await (no callbacks)
  • Write meaningful commit messages
  • Test thoroughly before submitting PR
  • Follow existing code patterns

πŸ“Š Project Structure

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

πŸ‘¨β€πŸ’» Author

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

πŸ“„ License

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

πŸ™ Acknowledgments

  • 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

πŸ“ž Support


Made with ❀️ for campus communities worldwide


πŸ”„ Version History

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

Start Here: Installation Guide β†’

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors