Google Developer Groups - COMSATS University Islamabad, Lahore Campus
Live Website β’ Admin Panel β’ Community
- Overview
- Features
- Technology Stack
- Prerequisites
- Installation
- Project Structure
- Development
- Environment Variables
- Database Setup
- Email Configuration
- Deployment
- Admin Panel
- Contributing
- License
- Support
The GDG COMSATS Website is a modern, responsive web application built for the Google Developer Groups chapter at COMSATS University Islamabad, Lahore Campus. It serves as the central hub for our tech community, featuring event management, team showcases, resource sharing, and community engagement tools.
- Community Building: Connect students and tech enthusiasts
- Event Management: Showcase workshops, hackathons, and tech talks
- Resource Sharing: Provide access to Google's developer tools and learning materials
- Team Showcase: Highlight our dedicated team members and their contributions
- Responsive Design: Mobile-first approach with beautiful animations
- Event Showcase: Dynamic event listings with registration links
- Team Profiles: Interactive team member cards with social links
- Photo Gallery: Event photos organized by collections
- Resource Library: Curated developer resources and tools
- Contact System: Integrated contact form with email notifications
- Content Management: Full CRUD operations for all content
- Event Management: Create, edit, and manage events
- Team Management: Add and manage team member profiles
- Gallery Management: Upload and organize event photos
- Resource Management: Curate and categorize developer resources
- Contact Management: View and respond to contact submissions
- Analytics Dashboard: Website statistics and insights
- Google Material Design: Consistent with Google's design principles
- Smooth Animations: GSAP-powered animations and transitions
- Dark/Light Theme: Automatic theme detection and switching
- Accessibility: WCAG 2.1 compliant with proper ARIA labels
- SEO Optimized: Meta tags, structured data, and sitemap
- React 18 - Modern React with hooks and concurrent features
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library for React
- GSAP - Professional-grade animation library
- React Router - Client-side routing
- Lucide React - Beautiful icon library
- Supabase - Backend-as-a-Service platform
- PostgreSQL - Relational database
- Row Level Security - Database-level security policies
- Real-time Subscriptions - Live data updates
- Vite - Fast build tool and development server
- ESLint - Code linting and formatting
- PostCSS - CSS processing and optimization
- Autoprefixer - Automatic CSS vendor prefixing
- EmailJS - Client-side email sending
- Netlify - Static site hosting and deployment
- Google Fonts - Typography (Google Sans, Roboto)
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm (v8.0.0 or higher) or yarn (v1.22.0 or higher)
- Git (v2.30.0 or higher)
- VS Code with the following extensions:
- ES7+ React/Redux/React-Native snippets
- Tailwind CSS IntelliSense
- TypeScript Importer
- Prettier - Code formatter
git clone https://github.com/gdg-comsats/website.git
cd gdg-comsats-websitenpm install
# or
yarn install# Copy the environment template
cp .env.example .env
# Edit the environment variables
nano .env# The database will be automatically set up when you configure Supabase
# See the Database Setup section below for detailed instructionsnpm run dev
# or
yarn devThe application will be available at http://localhost:5173
gdg-comsats-website/
βββ public/ # Static assets
β βββ vite.svg # Vite logo
β βββ favicon.ico # Website favicon
βββ src/ # Source code
β βββ components/ # React components
β β βββ admin/ # Admin panel components
β β β βββ AdminApp.tsx
β β β βββ AdminDashboard.tsx
β β β βββ AdminLayout.tsx
β β β βββ AdminLogin.tsx
β β β βββ ContactManager.tsx
β β β βββ EventsManager.tsx
β β β βββ GalleryManager.tsx
β β β βββ ResourcesManager.tsx
β β β βββ TeamManager.tsx
β β βββ About.tsx # About section component
β β βββ Contact.tsx # Contact form component
β β βββ Events.tsx # Events showcase component
β β βββ Footer.tsx # Website footer
β β βββ Gallery.tsx # Photo gallery component
β β βββ Hero.tsx # Hero section component
β β βββ Navigation.tsx # Navigation bar
β β βββ Resources.tsx # Resources section
β β βββ Team.tsx # Team showcase component
β βββ lib/ # Utility libraries
β β βββ emailjs.ts # EmailJS configuration
β β βββ supabase.ts # Supabase client and functions
β βββ App.tsx # Main application component
β βββ index.css # Global styles
β βββ main.tsx # Application entry point
β βββ vite-env.d.ts # Vite type definitions
βββ supabase/ # Database migrations
β βββ migrations/ # SQL migration files
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ eslint.config.js # ESLint configuration
βββ index.html # HTML template
βββ package.json # Project dependencies
βββ postcss.config.js # PostCSS configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.app.json # App-specific TypeScript config
βββ tsconfig.node.json # Node-specific TypeScript config
βββ vite.config.ts # Vite configuration
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run ESLint
npm run lint
# Type checking
npm run type-check-
Feature Development
git checkout -b feature/your-feature-name npm run dev # Make your changes npm run lint npm run build git commit -m "feat: add your feature" git push origin feature/your-feature-name
-
Component Development
- Create components in
src/components/ - Use TypeScript for type safety
- Follow the existing naming conventions
- Add proper prop types and documentation
- Create components in
-
Styling Guidelines
- Use Tailwind CSS utility classes
- Follow the Google Material Design principles
- Maintain consistent spacing using the 8px grid system
- Use the predefined color palette (Google colors)
Create a .env file in the root directory with the following variables:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# EmailJS Configuration (Optional)
VITE_EMAILJS_SERVICE_ID=your_emailjs_service_id
VITE_EMAILJS_TEMPLATE_ID=your_emailjs_template_id
VITE_EMAILJS_PUBLIC_KEY=your_emailjs_public_key
# Analytics (Optional)
VITE_GA_TRACKING_ID=your_google_analytics_id| Variable | Description | Required |
|---|---|---|
VITE_SUPABASE_URL |
Your Supabase project URL | β |
VITE_SUPABASE_ANON_KEY |
Supabase anonymous key | β |
VITE_EMAILJS_SERVICE_ID |
EmailJS service identifier | β |
VITE_EMAILJS_TEMPLATE_ID |
EmailJS template identifier | β |
VITE_EMAILJS_PUBLIC_KEY |
EmailJS public key | β |
- Go to Supabase
- Create a new project
- Copy your project URL and anon key
- Update your
.envfile
The database schema is automatically created using the migration files in supabase/migrations/. The migrations include:
- Events Table: Store event information
- Team Members Table: Team member profiles
- Gallery Images Table: Event photos and media
- Resources Table: Developer resources and tools
- Contact Submissions Table: Contact form submissions
The migrations automatically configure RLS policies for:
- Public read access for website content
- Authenticated admin access for content management
- Secure contact form submissions
-- Run this in your Supabase SQL editor to create an admin user
INSERT INTO auth.users (email, encrypted_password, email_confirmed_at, created_at, updated_at)
VALUES ('admin@gdgcomsats.com', crypt('your-secure-password', gen_salt('bf')), now(), now(), now());- Create an account at EmailJS
- Create an email service (Gmail, Outlook, etc.)
- Create email templates using the provided templates in
emailjs-templates.md - Update your environment variables
The project includes three professional email templates:
- Contact Form Submission: For receiving contact form messages
- Auto-Reply: Automatic response to users
- Event Registration: For event registration confirmations
-
Build the Project
npm run build
-
Deploy to Netlify
# Install Netlify CLI npm install -g netlify-cli # Login to Netlify netlify login # Deploy netlify deploy --prod --dir=dist
-
Environment Variables
- Go to your Netlify dashboard
- Navigate to Site settings > Environment variables
- Add all required environment variables
-
Build for Production
npm run build
-
Upload to Your Hosting Provider
- Upload the contents of the
dist/folder - Configure your server to serve
index.htmlfor all routes - Set up environment variables on your hosting platform
- Upload the contents of the
- Environment variables configured
- Database migrations applied
- Email templates set up
- Domain configured
- SSL certificate installed
- Analytics tracking configured
- Error monitoring set up
- Navigate to
/adminon your deployed website - Login with your admin credentials
- Use the dashboard to manage content
- Dashboard: Overview of website statistics
- Events Management: Create, edit, and delete events
- Team Management: Manage team member profiles
- Gallery Management: Upload and organize photos
- Resources Management: Curate developer resources
- Contact Management: View and respond to messages
-- Create additional admin users
INSERT INTO auth.users (email, encrypted_password, email_confirmed_at, created_at, updated_at)
VALUES ('newadmin@gdgcomsats.com', crypt('secure-password', gen_salt('bf')), now(), now(), now());We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting (
npm run lint) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and conventions
- Write clear, descriptive commit messages
- Add comments for complex logic
- Update documentation when necessary
- Test your changes thoroughly
- Use TypeScript for type safety
- Follow React best practices and hooks patterns
- Use Tailwind CSS for styling
- Maintain consistent naming conventions
- Write self-documenting code
- Use the GitHub issue tracker
- Provide detailed descriptions
- Include steps to reproduce
- Add screenshots when helpful
- Documentation: Check this README and inline code comments
- Issues: Create a GitHub issue for bugs or feature requests
- Community: Join our GDG Community
- Email: Contact us at gdsc.cuilahore@gmail.com
- Website: gdgcomsats.com
- Instagram: @gdgoc.cuilhr
- LinkedIn: GDG COMSATS
- WhatsApp: Community Group