TPI-CPC 2.0 is a comprehensive full-stack web application for the Technical Polytechnic Institute Computer Programming Club. The platform provides a complete ecosystem for club management, including member registration, event management, blog publishing, and administrative dashboards.
- Framework: React 19.1.1 with Vite
- Routing: React Router DOM v7
- Styling: TailwindCSS v4 with custom animations
- UI Components: Radix UI, Shadcn/ui components
- Animations: Framer Motion
- Icons: Lucide React
- HTTP Client: Axios
- Notifications: React Hot Toast
- Runtime: Node.js with Express v5
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (jsonwebtoken)
- Password Security: Bcrypt
- File Upload: Multer & Cloudinary
- Email Service: Nodemailer
- API Security: CORS enabled
- Framework: React 19.1.1 with Vite
- Rich Text Editor: Quill
- Date Management: date-fns, react-day-picker
- UI Components: Radix UI, Shadcn/ui
- Styling: TailwindCSS v4
TPI-CPC2.0/
├── frontend/ # Public-facing website
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Route pages
│ │ ├── layouts/ # Layout components
│ │ └── assets/ # Static assets
│ └── package.json
│
├── backend/ # REST API server
│ ├── src/
│ │ ├── controllers/ # Request handlers
│ │ ├── models/ # MongoDB schemas
│ │ ├── routes/ # API endpoints
│ │ ├── middlewares/ # Custom middleware
│ │ ├── db/ # Database configuration
│ │ └── utils/ # Helper utilities
│ ├── Server.js # Main server file
│ └── package.json
│
└── dashboard/ # Admin panel
├── src/
│ ├── components/ # UI components
│ ├── pages/ # Admin pages
│ ├── contexts/ # React contexts
│ └── layout/ # Layout components
└── package.json
- Home Page: Hero section with club introduction
- About: Club information and mission
- Team Members: Display of club executives and members
- Events: Upcoming and past event listings
- Blogs: Technical articles and tutorials
- Testimonials: Member reviews and feedback
- User Authentication: Sign up, login, password recovery
- User Profile: Personal dashboard for registered members
- Review System: Members can submit reviews
- Team Management: Add, edit, delete team members
- Advisor Management: Manage club advisors
- Event Management: Create and manage club events
- Blog Publishing: Rich text editor for blog creation
- Content Moderation: Review and manage user submissions
- Analytics: View club statistics and metrics
- RESTful Architecture: Clean and organized API structure
- JWT Authentication: Secure token-based authentication
- File Upload: Cloud-based image storage with Cloudinary
- Email Integration: Automated email notifications
- Data Validation: Mongoose schema validation
- Error Handling: Comprehensive error management
POST /signup
- User registrationPOST /login
- User authenticationGET /profile
- Get user profilePUT /update-profile
- Update user informationPOST /forgot-password
- Password recovery
POST /login
- Admin authenticationGET /profile
- Admin profilePUT /update-profile
- Update admin details
GET /
- List all team membersPOST /add
- Add new team member (Admin)PUT /update/:id
- Update team member (Admin)DELETE /delete/:id
- Remove team member (Admin)
GET /
- List all advisorsPOST /add
- Add new advisor (Admin)PUT /update/:id
- Update advisor (Admin)DELETE /delete/:id
- Remove advisor (Admin)
GET /
- List all eventsGET /:id
- Get specific eventPOST /add
- Create new event (Admin)PUT /update/:id
- Update event (Admin)DELETE /delete/:id
- Delete event (Admin)
GET /
- List all blogsGET /:id
- Get specific blogPOST /add
- Create new blog (Admin)PUT /update/:id
- Update blog (Admin)DELETE /delete/:id
- Delete blog (Admin)
GET /
- List all reviewsPOST /add
- Submit new review (User)DELETE /delete/:id
- Delete review (Admin)
- Node.js v18+ and npm
- MongoDB database
- Cloudinary account for image storage
- SMTP server for email functionality
Create .env
files in each directory:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret
EMAIL_USER=your_email_address
EMAIL_PASS=your_email_password
VITE_API_URL=http://localhost:5000
VITE_API_URL=http://localhost:5000
- Clone the repository
git clone https://github.com/your-username/TPI-CPC2.0.git
cd TPI-CPC2.0
- Install Backend Dependencies
cd backend
npm install
- Install Frontend Dependencies
cd ../frontend
npm install
- Install Dashboard Dependencies
cd ../dashboard
npm install
- Start Backend Server
cd backend
npm run dev
Server runs on http://localhost:5000
- Start Frontend Application
cd frontend
npm run dev
Frontend runs on http://localhost:5173
- Start Admin Dashboard
cd dashboard
npm run dev
Dashboard runs on http://localhost:5174
- Build Frontend
cd frontend
npm run build
- Build Dashboard
cd dashboard
npm run build
- Start Backend
cd backend
npm start
- fullName (String, required)
- email (String, unique, required)
- mobileNumber (String, required)
- rollNumber (String, required)
- department (String, required)
- shift (String, required)
- password (String, min: 6, required)
- profileImage (String, required)
- otp (Number, for password reset)
- name (String, required)
- email (String, unique, required)
- password (String, required)
- profilePic (String)
- name (String, required)
- role (String, required)
- memberProfile (String, required)
- name (String, required)
- designation (String, required)
- profileUrl (String, required)
- title (String, required)
- location (String, required)
- description (String, required)
- eventType (String, required)
- organizer (String, required)
- startTime (String, required)
- endTime (String)
- status (String, required)
- eventImage (String, required)
- title (String, required)
- description (String, required)
- image (String, required)
- timestamps (auto-generated)
- userId (ObjectId, ref: User)
- reviewText (String, required)
- timestamps (auto-generated)
- Password Hashing: Bcrypt for secure password storage
- JWT Authentication: Token-based authentication system
- Protected Routes: Middleware for route protection
- CORS Configuration: Cross-origin resource sharing
- Input Validation: Schema-based validation
- File Upload Security: File type and size restrictions
- Environment Variables: Sensitive data protection
The backend is configured for Vercel deployment with vercel.json
:
{
"version": 2,
"builds": [
{
"src": "Server.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "Server.js"
}
]
}
Both frontend and dashboard can be deployed to:
- Vercel
- Netlify
- GitHub Pages
- Any static hosting service
npm run dev
- Start development servernpm run build
- Build for productionnpm run lint
- Run ESLintnpm run preview
- Preview production build
npm run dev
- Start with nodemon (auto-reload)npm start
- Start production server
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Test all API endpoints using Postman or similar tools
- Verify authentication flows
- Check responsive design across devices
- Test file upload functionality
- Verify email notifications
- Lazy loading for images
- Code splitting in React applications
- Database indexing for faster queries
- Caching strategies for static content
- Compression middleware for API responses
- Maximum file upload size: 10MB
- Email service requires SMTP configuration
- MongoDB connection required for all operations
- Real-time features not yet implemented
- Real-time notifications using WebSockets
- Advanced search and filtering
- Social media integration
- Payment gateway for event registration
- Mobile application development
- Analytics dashboard with charts
- Multi-language support
- Dark mode toggle
- PWA implementation
- Automated testing suite
For issues, questions, or suggestions:
- Create an issue in the GitHub repository
- Contact the development team
- Check documentation for common solutions
This project is proprietary software for the Technical Polytechnic Institute Computer Programming Club. All rights reserved.
- Technical Polytechnic Institute for support
- All club members for feedback and testing
- Open-source community for amazing tools and libraries
Developed with ❤️ by TPI-CPC Development Team
Last Updated: January 2025