Skip to content

Latest commit

 

History

History
728 lines (524 loc) · 14.5 KB

File metadata and controls

728 lines (524 loc) · 14.5 KB

🌟 NexaSphere

Official Community Platform — GL Bajaj Group of Institutions, Mathura

Connecting students with opportunities across Tech and Non-Tech domains through an integrated digital ecosystem


NexaSphere homepage preview



🔗 Quick Access

Resource Link
🌐 Live Website
🔑 Admin Dashboard
📧 Contact nexasphere@glbajajgroup.org
💼 Institution GL Bajaj Group of Institutions, Mathura


🚀 Technology Stack

Modern, scalable architecture built with industry-leading technologies:


Frontend Layer

⚡ React 18 + Vite 5

🎨 Vanilla CSS with Advanced Motion

📦 Vercel Hosting

Backend Layer

☕ Java 17 + Spring Boot 3

🐍 Python 3.11 + FastAPI

🚀 Railway / Render / Fly.io

Database

🗄️ PostgreSQL (Production)

💾 H2 (Development)

📊 Supabase Integration

Services

📝 Google Sheets Integration

🔐 JWT Authentication

🔄 Real-time Updates



📁 Project Architecture

nexasphere/
│
├── 📂 src/                          ← Main Frontend Application
│   ├── pages/                       ← Page Components
│   │   ├── home/
│   │   ├── about/
│   │   ├── activities/
│   │   ├── events/
│   │   ├── team/
│   │   ├── contact/
│   │   ├── membership/
│   │   ├── recruitment/
│   │   └── admin/
│   ├── shared/                      ← Reusable Components & Utilities
│   ├── services/                    ← API Client Layer
│   ├── styles/                      ← Global Stylesheets
│   ├── data/                        ← Static Content & Configuration
│   └── App.jsx, main.jsx
│
├── 📂 admin-dashboard/              ← Standalone Admin Application
│   ├── src/
│   │   ├── pages/                   ← Admin Pages
│   │   ├── components/              ← Admin Components
│   │   ├── services/                ← API Integration
│   │   └── hooks/                   ← Custom React Hooks
│   └── package.json
│
├── 📂 server-java/                  ← REST API Backend
│   ├── src/main/java/org/nexasphere/
│   │   ├── controller/              ← REST Endpoints
│   │   ├── service/                 ← Business Logic
│   │   ├── model/                   ← JPA Entities
│   │   ├── repository/              ← Data Access Layer
│   │   └── config/                  ← Spring Configuration
│   ├── pom.xml
│   └── README.md
│
├── 📂 server-python/                ← Forms Microservice
│   ├── routers/                     ← API Routes
│   ├── services/                    ← Business Logic
│   ├── models/                      ← Data Models
│   ├── requirements.txt
│   └── README.md
│
├── Configuration Files
│   ├── package.json
│   ├── vite.config.js
│   ├── vercel.json
│   ├── netlify.toml
│   └── index.html
│
└── README.md                        ← This File


🛠️ Local Development Setup

✅ Prerequisites

Make sure you have these installed on your system:


Tool Version Purpose
Node.js 20+ Frontend development & package management
Java JDK 17+ Java backend compilation & execution
Maven 3.8+ Java project build tool
Python 3.11+ Forms service runtime
PostgreSQL Latest Database (optional for development)

🎯 Step 1: Frontend Setup


Clone and Install:

cd nexasphere
npm install
npm run dev

▶️ Access: http://localhost:5173


📋 Environment Variables (.env.local):

VITE_API_BASE=http://localhost:8080


☕ Step 2: Java Backend Setup


Build and Run:

cd server-java
mvn clean install
mvn spring-boot:run

▶️ Access: http://localhost:8080


📋 Environment Variables (application.properties):

# Admin Credentials
ADMIN_EMAIL=nexasphere@glbajajgroup.org
ADMIN_PASSWORD=Admin@123

# CORS Configuration
CORS_ORIGIN=http://localhost:5173,https://nexasphere-glbajaj.vercel.app

# Database (Development - H2)
DB_URL=jdbc:h2:mem:nexaspheredb
DB_DRIVER=org.h2.Driver
DB_USER=sa
DB_PASS=

For PostgreSQL (Production):

DB_URL=jdbc:postgresql://localhost:5432/nexasphere
DB_DRIVER=org.postgresql.Driver
DB_USER=postgres
DB_PASS=yourpassword


🐍 Step 3: Python Forms Service


Setup Virtual Environment & Run:

cd server-python

# Create virtual environment
python -m venv venv

# Activate (choose based on your OS)
source venv/bin/activate          # macOS/Linux
# OR
venv\Scripts\activate             # Windows

# Install dependencies
pip install -r requirements.txt

# Run development server
uvicorn main:app --reload --port 8000

▶️ Access: http://localhost:8000

📋 Interactive Docs: http://localhost:8000/docs


📋 Environment Variables (.env):

# Google Cloud Authentication
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_SERVICE_ACCOUNT_EMAIL=your-sa@project.iam.gserviceaccount.com
GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
GOOGLE_SHEET_ID=your-sheet-id

# Supabase Configuration
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# CORS & Server
CORS_ORIGIN=http://localhost:5173,


👨‍💼 Step 4: Admin Dashboard


Install and Run:

cd admin-dashboard
npm install
npm run dev

▶️ Access: http://localhost:5174


📋 Environment Variables (.env.local):

VITE_API_BASE=http://localhost:8080


🌐 API Documentation

🔓 Public Endpoints (No Authentication)


Method Endpoint Description
GET /api/content/events Fetch all community events
GET /api/content/activity-events/{key} Get events by activity type
GET /api/content/core-team List all core team members
POST /api/forms/membership Submit membership application
POST /api/forms/recruitment Submit recruitment application
POST /api/core-team/apply Submit core team application

🔐 Protected Endpoints (Admin Only)


Method Endpoint Description
POST /api/admin/events Create new event
PUT /api/admin/events/{id} Update existing event
DELETE /api/admin/events/{id} Delete event
POST /api/admin/core-team Create core team member
PUT /api/admin/core-team/{id} Update core team member
DELETE /api/admin/core-team/{id} Delete core team member


👨‍💻 Admin Dashboard Features


📊 Event Management

  • ✓ Create new events
  • ✓ Edit event details
  • ✓ Delete events
  • ✓ Real-time updates

🎯 Activity Events

  • ✓ Manage 8 activity categories
  • ✓ Hackathon, Codathon, Ideathon
  • ✓ Workshops & Insight Sessions
  • ✓ Open Source Day & Tech Debate

👥 Team Management

  • ✓ Add core team members
  • ✓ Edit member profiles
  • ✓ Manage roles & contacts
  • ✓ Remove members

⚡ Real-time Updates

  • ✓ Event-driven architecture
  • ✓ No page reloads
  • ✓ Instant UI synchronization
  • ✓ Seamless user experience

🔑 Admin Credentials:



🚀 Production Deployment

🌐 Frontend Deployment (Vercel)


  1. Connect Repository: Link GitHub repo to Vercel
  2. Configure Build:
    • Build Command: npm run build
    • Output Directory: dist
  3. Set Environment Variables:
    • VITE_API_BASE=https://your-api-url.railway.app
  4. Deploy and monitor

📍 Live URL:



👨‍💼 Admin Dashboard Deployment (Vercel)


  1. Create Separate Vercel Project from admin-dashboard/ folder
  2. Configure (same as frontend):
    • Build: npm run build
    • Output: dist
    • Env: VITE_API_BASE=https://your-api-url.railway.app

📍 Live URL:



☕ Java Backend Deployment (Railway)


Installation:

npm i -g @railway/cli
railway login
cd server-java
railway init
railway up

📋 Production Environment Variables:

ADMIN_EMAIL=nexasphere@glbajajgroup.org
ADMIN_PASSWORD=Admin@123
CORS_ORIGIN=
DB_URL=jdbc:postgresql://[host]:5432/railway
DB_DRIVER=org.postgresql.Driver
DB_USER=postgres
DB_PASS=[from-dashboard]


🐍 Python Service Deployment


Railway Deployment:

cd server-python
railway init
railway up

Environment Variables: (Same as local .env)




🗄️ Database Configuration

💾 Development (H2 In-Memory)

Auto-configured on startup:

  • ✓ Tables created automatically
  • ✓ Seed data loaded
  • ✓ No manual setup required

🗄️ Production (PostgreSQL)


Create Database:

CREATE DATABASE nexasphere;

Setup:

  • Spring Boot creates tables via JPA
  • Seed data loads from data.sql
  • Ready for production use

Supabase Tables:

CREATE TABLE membership_forms (
  id SERIAL PRIMARY KEY,
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) NOT NULL,
  whatsapp VARCHAR(10) NOT NULL,
  year VARCHAR(20) NOT NULL,
  branch VARCHAR(100) NOT NULL,
  section VARCHAR(1) NOT NULL,
  reason TEXT,
  created_at TIMESTAMP DEFAULT NOW()
);

CREATE TABLE recruitment_forms (
  id SERIAL PRIMARY KEY,
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) NOT NULL,
  whatsapp VARCHAR(10) NOT NULL,
  year VARCHAR(20) NOT NULL,
  branch VARCHAR(100) NOT NULL,
  section VARCHAR(1) NOT NULL,
  reason TEXT,
  created_at TIMESTAMP DEFAULT NOW()
);

CREATE TABLE core_team_applications (
  id SERIAL PRIMARY KEY,
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) NOT NULL,
  whatsapp VARCHAR(10) NOT NULL,
  year VARCHAR(20) NOT NULL,
  branch VARCHAR(100) NOT NULL,
  section VARCHAR(1) NOT NULL,
  reason TEXT,
  created_at TIMESTAMP DEFAULT NOW()
);


🧪 Testing


React Frontend

npm run test
npm run test:coverage

Java Backend

mvn test
mvn verify

Python Service

pytest
pytest --cov


📖 Documentation

For detailed information about specific components, visit:




🤝 Contributing

This is an internal project for the NexaSphere core team.


Workflow

  1. Clone the repository
  2. Create feature branch: git checkout -b feature/your-feature
  3. Make changes with quality standards
  4. Test thoroughly before submission
  5. Submit pull request for review

📋 Code Quality Standards

  • ✓ No console.log statements
  • ✓ Functions under 40 lines
  • ✓ Consistent naming conventions
  • ✓ Zero unused imports
  • ✓ Meaningful commit messages
  • ✓ Comprehensive documentation


📋 Project Checklist


Documentation ✅

  • Complete API documentation
  • Environment variable guides
  • Setup instructions for all services
  • Deployment procedures
  • Database configuration

Infrastructure 🚀

  • Frontend hosting (Vercel)
  • API backend available
  • Database configured
  • Admin dashboard deployed
  • CORS properly configured

Future Improvements 🎯

  • Architecture diagrams
  • Video tutorials
  • API Swagger documentation
  • Performance monitoring
  • Security audit logs


📝 License & Usage

Internal Project — GL Bajaj NexaSphere Core Team
All rights reserved. Not for external distribution.



📧 Contact & Support


Resource Details
📧 Email nexasphere@glbajajgroup.org
🏢 Institution GL Bajaj Group of Institutions, Mathura
🌐 Website https://nexa-sphere-sigma.vercel.app
👨‍💼 Admin Panel https://admin-nexasphere.vercel.app



Made with ❤️ by NexaSphere Core Team

Version 1.0 | Last Updated: May 2026