A comprehensive campus community platform built for university students to connect, collaborate, and thrive in a safe, vibrant academic environment.
- Academic Communities: Join or create groups for classes, clubs, and interests
- Post & Comment System: Share thoughts, resources, and engage in discussions
- Voting System: Upvote and downvote posts and comments
- Real-time Updates: Live notifications and content updates
- Events Management: Create, discover, and RSVP to campus events
- Student Marketplace: Buy, sell, and exchange goods within your campus network
- Surveys & Polls: Participate in community surveys and make your voice heard
- Weather Alerts: Real-time weather updates for your campus location
- Direct Messaging: Private conversations with other students
- Real-time Chat: Instant messaging with typing indicators
- Notifications: Stay updated with community activities
- AI-Powered Content Moderation: Advanced filtering for inappropriate content
- Community Guidelines: Enforced community standards
- Reporting System: Report violations and inappropriate content
- User Verification: Secure authentication with university email
- Academic Resources: Access to study materials and campus services
- Support Networks: Mental health, legal, and career resources
- Campus Information: Maps, transport, and essential services
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, Radix UI Components
- Backend: Next.js API Routes, Server Actions
- Database: Sanity CMS (Headless CMS)
- Authentication: Clerk
- Real-time: Pusher
- AI Moderation: OpenAI API
- Deployment: Vercel (Ready)
- Node.js 18+
- pnpm, npm, or yarn
- Clerk Account
- Sanity Account
- OpenAI API key (for content moderation)
Create a .env.local
file with the following variables:
# Sanity CMS
NEXT_PUBLIC_SANITY_PROJECT_ID=your-project-id
NEXT_PUBLIC_SANITY_DATASET=production
SANITY_API_TOKEN=your-sanity-read-token
SANITY_API_WRITE_TOKEN=your-sanity-write-token
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-clerk-publishable-key
CLERK_SECRET_KEY=your-clerk-secret-key
# OpenAI (for content moderation)
OPENAI_API_KEY=your-openai-api-key
# Pusher (for real-time features)
PUSHER_APP_ID=your-pusher-app-id
PUSHER_KEY=your-pusher-key
PUSHER_SECRET=your-pusher-secret
PUSHER_CLUSTER=your-pusher-cluster
NEXT_PUBLIC_PUSHER_KEY=your-pusher-key
NEXT_PUBLIC_PUSHER_CLUSTER=your-pusher-cluster
# Weather API
WEATHER_API_KEY=your-weather-api-key
# Base URL
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Clone the repository
git clone <your-repo-url>
cd campus-connect
# Install dependencies
pnpm install
# Start the development server
pnpm run dev
- Create a Sanity account at sanity.io
- Create a new project
- Install Sanity CLI globally:
npm install -g @sanity/cli
- Initialize Sanity in your project:
sanity init
- Deploy Sanity Studio:
sanity deploy
- Create a Clerk application at clerk.com
- Configure authentication providers
- Set up redirect URLs for your domain
- Add environment variables to your
.env.local
campus-connect/
βββ app/ # Next.js 15 app router
β βββ (admin)/ # Admin routes
β βββ (app)/ # Main app routes
β βββ api/ # API routes
βββ components/ # React components
β βββ ui/ # Reusable UI components
β βββ post/ # Post-related components
β βββ community/ # Community components
β βββ events/ # Event components
β βββ marketplace/ # Marketplace components
β βββ surveys/ # Survey components
β βββ messages/ # Messaging components
βββ lib/ # Utility functions
βββ sanity/ # Sanity CMS configuration
β βββ schemaTypes/ # Content schemas
β βββ lib/ # Sanity utilities
βββ types/ # TypeScript type definitions
βββ hooks/ # Custom React hooks
βββ action/ # Server actions
βββ public/ # Static assets
pnpm dev
- Start development server with Turbopackpnpm build
- Build for productionpnpm start
- Start production serverpnpm lint
- Run ESLintpnpm typegen
- Generate Sanity types
The platform includes a sophisticated AI-powered content moderation system:
- Multi-layered filtering: Keyword, sentiment, and AI analysis
- Real-time protection: All user-generated content is screened
- Community standards: Enforces academic community guidelines
- Transparent feedback: Clear explanations for blocked content
- Responsive Design: Optimized for all devices
- Accessibility: WCAG compliant components
- Modern Interface: Clean, intuitive design
- Dark Mode Ready: Built with theming support
- Loading States: Smooth user experience
- Authentication: Secure user authentication with Clerk
- Authorization: Role-based access control
- Content Validation: Server-side validation for all inputs
- Rate Limiting: Protection against abuse
- Data Privacy: GDPR compliant data handling
- Progressive Web App: Installable on mobile devices
- Touch Optimized: Designed for touch interactions
- Offline Capable: Basic functionality without internet
- Push Notifications: Real-time updates (coming soon)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check the
/docs
folder for detailed guides - Issues: Report bugs and feature requests via GitHub Issues
- Discussions: Join community discussions on GitHub
- Email: Contact us at info@campusconnect.com
- Built with Next.js
- Styled with Tailwind CSS
- Powered by Sanity CMS
- Secured by Clerk
- Enhanced with OpenAI
Built with β€οΈ for the academic community