Skip to content

NZ-SheSharp/she-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

763 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

She Sharp Banner

🚀 She Sharp

Bridging the Gender Gap in STEM

An innovative non-profit platform that leverages cutting-edge technology to empower women in STEM fields.
Supports mentorship programs, networking events, and career development with AI-powered assistance.
FREE community platform for women in technology.

Official Site · Events · Mentorship · Documentation · Contact


🚀 Visit Live Site 🚀


GitHub stars GitHub forks GitHub issues MIT License
Next.js TypeScript PostgreSQL Neon OpenAI

Share Project Repository

Share on X Share on LinkedIn

🌟 Pioneering the future of diversity in STEM. Built for the next generation of women in technology.

Important

This project demonstrates modern full-stack development practices with Next.js 15, TypeScript, and PostgreSQL. It combines a powerful frontend with secure backend services to provide comprehensive community management features.

📑 Table of Contents

TOC


🌟 About The Project

She Sharp Homepage

She Sharp is a comprehensive mentorship platform dedicated to bridging the gender gap in STEM fields. Founded in 2014, we've built a thriving community of over 1000+ women in technology, supported by 50+ corporate partners, and have hosted 84+ events to empower women in their STEM careers.

🚀 Revolutionary Dual-Role System: Users can seamlessly switch between mentor and mentee roles, enabling them to both guide others and learn from experienced professionals simultaneously - a unique approach that maximizes growth opportunities and creates a dynamic learning ecosystem.

Note

  • Node.js >= 20.0 required
  • PostgreSQL database required for data storage (Neon recommended)
  • OpenAI GPT API key required for AI features
  • All payment features have been removed for security reasons
Demo Experience our platform without installation!
GitHub Explore the source code and contribute!

Tip

⭐ Star us on GitHub to receive all release notifications and updates!

⭐ Star History

Our Mission

We are committed to creating an inclusive environment where women in STEM can:

  • Connect with mentors and peers in the industry
  • Learn through workshops, events, and educational resources
  • Grow professionally through mentorship and career development programs
  • Inspire the next generation of women in technology

Key Impact Metrics

  • 🎯 1000+ Active Community Members
  • 🤝 50+ Corporate Partners & Sponsors
  • 📅 84+ Events Since 2014
  • 👩‍🏫 18 Industry Mentors
  • 📈 85% Mentorship Success Rate
  • 🚀 5-6x Higher Promotion Likelihood for Mentees

✨ Features

For Community Members

🌐 Public Website

  • Dynamic Homepage - Hero carousel showcasing latest initiatives and achievements
  • About Section - Mission, vision, team profiles, and organizational timeline
  • Events Platform - Browse upcoming events, workshops, and special programs
  • Mentorship Program - Connect with industry mentors, apply for mentorship
  • Media Hub - Access podcasts, newsletters, photo galleries, and press coverage
  • Support Options - Multiple donation channels and sponsorship opportunities

🤖 AI-Powered Assistant

  • Smart Chatbot - OpenAI GPT-powered assistant for instant help
  • Contextual Responses - Organization-specific knowledge and guidance
  • 24/7 Availability - Always available to answer questions
  • Multilingual Support - Assists users in their preferred language

👥 Advanced Mentorship System

  • Dual-Role Capability - Simultaneously act as both mentor and mentee
  • Smart Matching - AI-powered mentor-mentee pairing based on expertise and goals
  • Dynamic Role Switching - Seamlessly transition between mentor and mentee roles
  • Relationship Management - Track mentorship progress with detailed analytics
  • Meeting Scheduler - Integrated scheduling with automated reminders
  • Progress Tracking - Monitor learning goals and professional development

🔄 Flexible Role System

  • Multi-Role Activation - Users can activate mentor, mentee, or admin roles independently
  • Role Verification - Mentor verification process ensures quality mentorship
  • Capacity Management - Mentors set their availability and maximum mentee count
  • Role Analytics - Detailed statistics for both mentoring and learning activities

For Organizations

💼 Dashboard & Admin

  • Team Management - Invite members, manage roles and permissions
  • Activity Tracking - Monitor team engagement and participation
  • User Management - Comprehensive user administration
  • Analytics - Track impact metrics and engagement

For Developers

🛠️ Advanced Technical Features

  • Modern Full-Stack Architecture - Next.js 15.4 with App Router, TypeScript, PostgreSQL
  • Type-Safe Development - End-to-end TypeScript with Drizzle ORM for database operations
  • Comprehensive API Layer - RESTful API with 25+ specialized endpoints
  • Multi-Role Authentication - JWT-based with role-based access control (RBAC)
  • Advanced Database Management - Migration versioning, automatic snapshots, rollback capabilities
  • Real-time Features - Dynamic dashboards with live data synchronization
  • Component Architecture - shadcn/ui with custom design system and Radix UI primitives
  • AI Integration - OpenAI GPT-powered intelligent assistant
  • Performance Optimization - Edge deployment with CDN and intelligent caching
  • Security-First Design - No payment processing, focus on core community features

🛠️ Tech Stack

Next.js
Next.js 15
React
React 19
TypeScript
TypeScript 5
PostgreSQL
PostgreSQL 16
Drizzle
Drizzle ORM
Tailwind
Tailwind CSS
Vercel
Vercel

Frontend Stack:

  • Framework: Next.js 15 with App Router
  • Language: TypeScript for type safety
  • Styling: Tailwind CSS v4 + Framer Motion
  • State: React Context + Server State
  • UI Components: shadcn/ui + Radix UI

Backend Stack:

  • Runtime: Node.js with Next.js API Routes
  • Database: PostgreSQL (Neon) with Drizzle ORM
  • Database Version Control: Migration snapshots and checkpoints
  • Authentication: JWT-based with bcrypt + NextAuth (OAuth)
  • AI Integration: OpenAI GPT API
  • Email: Resend for transactional emails (auth, mentorship, recruitment)
  • Notifications: Slack Incoming Webhooks for form submission alerts

DevOps & Monitoring:

  • Deployment: Vercel Edge Network
  • Storage: Cloudinary (image hosting)
  • Notifications: Slack (webhook-based alerts)
  • Analytics: Vercel Analytics
  • CI/CD: GitHub Actions

🚀 Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v20.0.0 or higher)

    node --version
  • pnpm (v8.0.0 or higher)

    npm install -g pnpm
  • PostgreSQL (v14 or higher)

    • Local installation or cloud service (e.g., Neon, Vercel Postgres, Supabase)
    • Note: pg_dump utility needed for full snapshot functionality (optional)
  • Git

    git --version

Installation

  1. Clone the repository

    git clone https://github.com/NZ-SheSharp/she-sharp.git
    cd she-sharp
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp .env.example .env.local
  4. Configure environment variables (see Environment Setup)

  5. Set up the database

    pnpm db:setup
    pnpm db:migrate
    pnpm db:seed
    
    # Create initial snapshot for version control
    pnpm db:snapshot "initial-setup"
  6. Start the development server

    pnpm dev
  7. Open your browser Navigate to http://localhost:3000

Environment Setup

Create a .env.local file with the following variables:

# Database (Neon PostgreSQL)
DATABASE_URL="postgresql://user:password@your-neon-host.neon.tech/neondb?sslmode=require"

# Authentication
AUTH_SECRET="your-auth-secret-key-min-32-chars"

# OAuth (NextAuth)
AUTH_GOOGLE_ID="your-google-oauth-client-id"
AUTH_GOOGLE_SECRET="your-google-oauth-client-secret"
AUTH_GITHUB_ID="your-github-oauth-client-id"
AUTH_GITHUB_SECRET="your-github-oauth-client-secret"


# Email Service (Resend)
RESEND_API_KEY="re_..."

# Application
BASE_URL="http://localhost:3000"
NEXT_PUBLIC_APP_URL="http://localhost:3000"

# Cloudinary Image Storage
CLOUDINARY_CLOUD_NAME="your_cloud_name"
CLOUDINARY_API_KEY="your_api_key"
CLOUDINARY_API_SECRET="your_api_secret"

# Slack Notifications (Optional)
SLACK_VOLUNTEER_WEBHOOK_URL="https://hooks.slack.com/services/..."
SLACK_CONTACT_WEBHOOK_URL="https://hooks.slack.com/services/..."

📖 Usage

Development Commands

# Start development server with Turbopack
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Database operations
pnpm db:setup         # Initial setup
pnpm db:generate      # Generate migrations
pnpm db:migrate       # Apply migrations
pnpm db:migrate:safe  # Apply migrations with automatic backup
pnpm db:seed          # Seed sample data
pnpm db:studio        # Open Drizzle Studio

# Database version control
pnpm db:status        # Check migration status
pnpm db:history       # View migration history
pnpm db:snapshot      # Create database snapshot
pnpm db:version       # Access all version control commands

# Linting and formatting
pnpm lint             # Run ESLint
pnpm format           # Format with Prettier

# Type checking
pnpm type-check       # Run TypeScript compiler

Common Tasks

Adding a New Page

  1. Create a new file in app/(site)/your-page/page.tsx
  2. Implement the page component:
    export default function YourPage() {
      return (
        <div className="container mx-auto py-8">
          <h1>Your Page Title</h1>
          {/* Page content */}
        </div>
      );
    }

Adding a New API Route

  1. Create a new file in app/api/your-endpoint/route.ts
  2. Implement the route handler:
    import { NextResponse } from 'next/server';
    
    export async function GET(request: Request) {
      // Your logic here
      return NextResponse.json({ data: 'response' });
    }

Adding a Database Table

  1. Define the schema in lib/db/schema.ts:

    export const yourTable = pgTable('your_table', {
      id: serial('id').primaryKey(),
      name: text('name').notNull(),
      createdAt: timestamp('created_at').defaultNow()
    });
  2. Generate and apply migrations:

    pnpm db:generate
    pnpm db:migrate

Database Version Control

The project includes a comprehensive database version control system built on top of Drizzle ORM:

  1. Before making schema changes, create a snapshot:

    pnpm db:snapshot "before-feature-xyz"
  2. Check migration status before deployment:

    pnpm db:status
  3. Apply migrations safely with automatic backup:

    pnpm db:migrate:safe
  4. Create checkpoints for stable versions:

    pnpm db:version checkpoint "v1.0-stable"
  5. View available snapshots for rollback:

    pnpm db:version list-snapshots

Tip

Best Practice: Always create snapshots before major database changes. The snapshot system works even with remote databases (like Neon) by storing migration state and schema information in JSON format.

For detailed documentation, see:

🧠 Core Business Logic

Revolutionary Dual-Role Mentorship System

She Sharp introduces a groundbreaking approach to mentorship where users can seamlessly operate in multiple roles simultaneously. This innovative system recognizes that learning and teaching often go hand-in-hand, especially in the dynamic STEM field.

🔄 Flexible Role Activation

// Users can activate multiple roles independently
const userRoles = {
  mentor: true,    // Guide junior professionals
  mentee: true,    // Learn from senior experts
  admin: false     // Platform administration (by invitation)
}

🎯 Smart Role Switching Benefits

  • Mentors can learn advanced skills while teaching fundamentals
  • Mentees can mentor others in areas where they excel
  • Continuous Growth through both teaching and learning experiences
  • Network Expansion across different experience levels
  • Skill Diversification by engaging with various expertise areas

📈 Mentorship Relationship Lifecycle

  1. Discovery Phase: Browse mentor profiles with detailed expertise and availability
  2. Application Process: Mentees apply with specific learning goals and challenges
  3. Matching & Approval: Mentors review and approve/reject applications based on fit
  4. Active Mentorship: Regular meetings with goal tracking and progress monitoring
  5. Relationship Management: Pause, resume, or complete relationships as needed

🎪 Meeting Management System

  • Meeting Types: Intro sessions, regular check-ins, milestone reviews, final evaluations
  • Smart Scheduling: Integrated calendar with automated reminders
  • Progress Tracking: Action items, goals, and feedback collection
  • Quality Assurance: Rating system and continuous improvement feedback

🏆 Comprehensive Analytics

  • Personal Stats: Meeting hours, mentorship count, goal achievement rates
  • Relationship Insights: Satisfaction scores, progress metrics, outcome tracking
  • Platform Metrics: Success rates, engagement levels, community growth

🎫 Event & Resource Ecosystem

📅 Dynamic Event System

  • Multi-Format Events: Online, in-person, and hybrid options
  • Event Categories: Workshops, networking, training, social gatherings, THRIVE programs
  • Smart Registration: Capacity management with waitlist functionality
  • Member Benefits: Tiered access based on membership level
  • Engagement Tracking: Attendance, feedback, and certificate issuance

📚 Intelligent Resource Management

  • Content Categories: Documents, videos, links, templates, guides
  • Access Control: Role-based and membership-tier permissions
  • Usage Analytics: Download tracking and engagement metrics
  • Quality Curation: Community ratings and admin moderation

💎 Membership Tiers & Benefits

🆓 Free Tier

  • Basic mentor browsing and application
  • Access to public resources
  • Free event participation
  • Community networking

Premium Tiers (Basic/Premium)

  • Priority mentor matching
  • Exclusive events and workshops
  • Advanced resources and templates
  • Extended meeting durations
  • Detailed analytics and insights

🏗️ Architecture

System Architecture

Tip

This architecture supports horizontal scaling and microservices patterns, making it production-ready for enterprise applications.

graph TB
    subgraph "Frontend Layer"
        A[Next.js App Router] --> B[React Components]
        B --> C[shadcn/ui Components]
        C --> D[API Client]
    end
    
    subgraph "Backend Layer"
        E[API Routes] --> F[Business Logic]
        F --> G[Drizzle ORM]
        G --> H[PostgreSQL]
    end
    
    subgraph "External Services"
        I[JWT Auth]
        J[Stripe API]
        K[OpenAI GPT]
        L[Cloudinary]
        P[Slack Webhooks]
    end
    
    D --> E
    F --> I
    F --> J
    F --> K
    F --> L
    F --> P
    
    subgraph "Infrastructure"
        M[Vercel Edge Network]
        N[CDN]
        O[Database Pool]
    end
    
    M --> A
    N --> A
    O --> H
Loading

Data Flow

sequenceDiagram
    participant U as User
    participant F as Frontend
    participant A as API Routes
    participant D as Database
    participant S as Stripe
    participant G as OpenAI
    
    U->>F: User Action
    F->>A: API Request
    A->>A: JWT Validation
    alt Payment Flow
        A->>S: Process Payment
        S->>A: Payment Confirmation
    else AI Chat
        A->>G: Send Message
        G->>A: AI Response
    else Data Operation
        A->>D: Query/Mutation
        D->>A: Result
    end
    A->>F: JSON Response
    F->>U: Update UI
Loading

Component Structure

graph LR
    subgraph "Pages"
        P1[Home]
        P2[About]
        P3[Events]
        P4[Mentorship]
        P5[Dashboard]
    end
    
    subgraph "Components"
        C1[Layout]
        C2[Sections]
        C3[UI Library]
        C4[Chatbot]
    end
    
    subgraph "Services"
        S1[Auth Service]
        S2[Payment Service]
        S3[Database Service]
        S4[AI Service]
    end
    
    P1 --> C1
    P2 --> C2
    P3 --> C3
    P4 --> C4
    P5 --> S1
    C4 --> S4
    P5 --> S2
Loading

⚡ Performance

Note

Performance metrics are continuously monitored to ensure optimal user experience.

Key Metrics:

  • 95+ Lighthouse Score across all categories
  • 🚀 < 1s Time to First Byte (TTFB)
  • 💨 < 100ms API response times
  • 📊 99.9% uptime reliability
  • 🔄 Real-time data synchronization

Performance Optimizations:

  • 🎯 Smart Caching: Next.js ISR and dynamic caching
  • 📦 Code Splitting: Automatic route-based splitting
  • 🖼️ Image Optimization: Next.js Image with WebP/AVIF
  • 🔄 Database Optimization: Connection pooling and indexed queries
  • 🌐 Edge Deployment: Global CDN distribution

📁 Project Structure

📁 View Full Project Structure
she-sharp/
├── app/                          # Next.js App Router
│   ├── (dashboard)/             # Protected dashboard routes
│   │   ├── dashboard/          # Main dashboard
│   │   ├── team/              # Team management
│   │   └── settings/          # User settings
│   ├── (login)/                # Authentication pages
│   │   ├── sign-in/          # Sign in page
│   │   └── sign-up/          # Sign up page
│   ├── (site)/                 # Public website
│   │   ├── about/            # About pages
│   │   ├── events/           # Events listing
│   │   ├── mentorship/       # Mentorship program
│   │   ├── media/            # Media hub
│   │   └── support/          # Support/donation
│   ├── api/                    # API routes
│   │   ├── auth/             # Authentication endpoints
│   │   ├── chat/             # AI chatbot endpoint
│   │   ├── stripe/           # Payment endpoints
│   │   └── user/             # User management
│   └── layout.tsx              # Root layout
├── components/                  # React components
│   ├── chatbot/                # AI chatbot UI
│   ├── layout/                 # Layout components
│   ├── sections/               # Page sections
│   └── ui/                     # shadcn/ui components
├── lib/                        # Core utilities
│   ├── auth/                   # Authentication logic
│   ├── db/                     # Database configuration
│   │   ├── schema.ts         # Database schema
│   │   ├── queries.ts        # Database queries
│   │   ├── drizzle.ts        # Drizzle client
│   │   ├── migrations/       # Database migrations
│   │   ├── snapshots/        # Database snapshots
│   │   ├── migration-manager.ts # Version control
│   │   └── snapshot-manager.ts  # Snapshot management
│   ├── data/                   # Static data
│   └── payments/               # Stripe integration
├── scripts/                    # Utility scripts
│   ├── db-version.ts          # Version control CLI
│   ├── db-snapshot.ts         # Snapshot creation
│   └── migrate-with-backup.ts # Safe migration
├── public/                     # Static assets
│   ├── images/                # Image files
│   └── logos/                 # Logo assets
├── styles/                     # Global styles
│   └── globals.css            # Tailwind imports
├── docs/                       # Documentation
├── data/                       # Static content data
└── middleware.ts              # Next.js middleware

🔌 API Documentation

Authentication Endpoints

POST /api/auth/sign-up

Create a new user account

{
  "email": "user@example.com",
  "password": "securePassword123"
}

POST /api/auth/sign-in

Authenticate user

{
  "email": "user@example.com",
  "password": "securePassword123"
}

POST /api/auth/sign-out

Sign out current user

User Role Management

GET /api/user/roles

Get user's active roles and role details

{
  "activeRoles": ["mentor", "mentee"],
  "roles": [
    {
      "type": "mentor",
      "isActive": true,
      "activatedAt": "2024-01-01T00:00:00Z",
      "verifiedAt": "2024-01-02T00:00:00Z"
    }
  ]
}

POST /api/user/roles

Activate a new role for the user

{
  "roleType": "mentor"
}

DELETE /api/user/roles

Deactivate a role

{
  "roleType": "mentee"
}

Profile Management

GET/POST /api/user/mentor-profile

Manage mentor profile with expertise, availability, and verification status

{
  "expertiseAreas": ["Software Engineering", "Data Science"],
  "yearsExperience": 5,
  "company": "Tech Corp",
  "jobTitle": "Senior Engineer",
  "bio": "Passionate about helping others grow",
  "maxMentees": 3,
  "isAcceptingMentees": true
}

GET/POST /api/user/mentee-profile

Manage mentee profile with learning goals and preferences

{
  "learningGoals": ["Career advancement", "Technical skills"],
  "careerStage": "mid-level",
  "preferredExpertiseAreas": ["Machine Learning", "Leadership"],
  "currentChallenge": "Transitioning to management role"
}

Mentorship System

GET /api/mentors

Browse available mentors with filtering options

GET /api/mentors/[id]

Get detailed mentor information

POST /api/mentorship/apply

Apply for mentorship relationship

{
  "mentorId": 123,
  "message": "I would love to learn from your experience",
  "goals": "Improve technical leadership skills"
}

POST /api/mentorship/approve

Approve or reject mentorship application (mentors only)

{
  "relationshipId": 456,
  "action": "approve",
  "feedback": "Looking forward to working together"
}

GET /api/mentorship/relationships

Get user's mentorship relationships (as mentor or mentee)

Meeting Management

GET /api/meetings

Get user's meetings with filtering options

POST /api/meetings

Schedule a new meeting

{
  "relationshipId": 789,
  "scheduledAt": "2024-12-01T10:00:00Z",
  "meetingType": "regular",
  "agenda": "Discuss career progression"
}

GET/PUT /api/meetings/[id]

Get or update meeting details, add notes and feedback

Events System

GET /api/events

Browse upcoming events with filtering

GET /api/events/[id]

Get detailed event information

POST /api/events/[id]/register

Register for an event

GET /api/events/my-registrations

Get user's event registrations

Resources

GET /api/resources

Browse learning resources with access control

GET /api/resources/[id]/download

Download resource (with permission checks)

Dashboard & Analytics

GET /api/dashboard/overview

Get comprehensive dashboard data including role-specific metrics

{
  "user": {
    "roles": ["mentor", "mentee"],
    "emailVerified": true
  },
  "stats": {
    "totalMeetings": 15,
    "completedMeetings": 12,
    "totalMeetingHours": 18.5
  },
  "mentor": {
    "currentMentees": 2,
    "maxMentees": 3,
    "isAcceptingMentees": true
  },
  "mentee": {
    "activeMentors": 1
  }
}

AI Chatbot

POST /api/chat

Send message to AI assistant

{
  "messages": [
    {
      "role": "user",
      "content": "How do I become a better mentor?"
    }
  ]
}

Admin Endpoints

GET /api/admin/analytics

Get platform analytics (admin only)

GET /api/admin/permissions

Manage admin permissions (admin only)

💾 Database Schema

Entity Relationship Diagram

The database architecture supports a sophisticated mentorship platform with flexible role management and comprehensive tracking capabilities.

erDiagram
    USERS ||--o{ USER_ROLES : "has"
    USERS ||--o{ MENTOR_PROFILES : "can have"
    USERS ||--o{ MENTEE_PROFILES : "can have"
    USERS ||--o{ USER_MEMBERSHIPS : "has"
    USERS ||--o{ ADMIN_PERMISSIONS : "may have"
    USERS ||--o{ USER_MENTORSHIP_STATS : "has"
    
    MENTOR_PROFILES ||--o{ MENTORSHIP_RELATIONSHIPS : "mentors"
    MENTEE_PROFILES ||--o{ MENTORSHIP_RELATIONSHIPS : "learns from"
    MENTORSHIP_RELATIONSHIPS ||--o{ MEETINGS : "includes"
    
    USERS ||--o{ EVENT_REGISTRATIONS : "registers for"
    EVENTS ||--o{ EVENT_REGISTRATIONS : "has"
    USERS ||--o{ RESOURCES : "uploads"
    USERS ||--o{ RESOURCE_ACCESS_LOGS : "accesses"
    
    USERS {
        int id PK
        string email UK
        string name
        string password_hash
        datetime created_at
        datetime email_verified_at
        datetime last_login_at
    }
    
    USER_ROLES {
        int id PK
        int user_id FK
        enum role_type "mentor|mentee|admin"
        boolean is_active
        datetime activated_at
        datetime verified_at
        int activation_step
    }
    
    MENTOR_PROFILES {
        int id PK
        int user_id FK
        json expertise_areas
        int years_experience
        string company
        string job_title
        text bio
        int max_mentees
        int current_mentees_count
        boolean is_accepting_mentees
        datetime verified_at
    }
    
    MENTEE_PROFILES {
        int id PK
        int user_id FK
        json learning_goals
        string career_stage
        json preferred_expertise_areas
        string preferred_meeting_frequency
        text current_challenge
    }
    
    MENTORSHIP_RELATIONSHIPS {
        int id PK
        int mentor_user_id FK
        int mentee_user_id FK
        enum status "pending|active|paused|completed|rejected"
        datetime started_at
        datetime ended_at
        text relationship_goals
        text mentor_notes
        text mentee_notes
    }
    
    MEETINGS {
        int id PK
        int relationship_id FK
        datetime scheduled_at
        int duration_minutes
        enum meeting_type "intro|regular|milestone|final"
        enum status "scheduled|completed|cancelled|no_show"
        json topics_discussed
        json action_items
        text mentor_notes
        text mentee_feedback
        int rating
    }
    
    EVENTS {
        int id PK
        string title
        text description
        enum event_type "workshop|networking|training|social|thrive"
        datetime start_time
        datetime end_time
        enum location_type "online|in_person|hybrid"
        int capacity
        boolean is_members_only
        enum required_membership_tier
    }
    
    USER_MEMBERSHIPS {
        int id PK
        int user_id FK
        enum tier "free|basic|premium"
        datetime expires_at
        json features_access
        datetime last_payment_at
        datetime next_billing_date
    }
Loading

Core Tables

📊 View SQL Schema

Core User Table (Role-Agnostic)

CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  name VARCHAR(100),
  email VARCHAR(255) UNIQUE NOT NULL,
  password_hash TEXT,
  created_at TIMESTAMP DEFAULT NOW(),
  email_verified_at TIMESTAMP,
  last_login_at TIMESTAMP,
  login_attempts INTEGER DEFAULT 0,
  locked_until TIMESTAMP
);

Multi-Role Activation System

CREATE TABLE user_roles (
  id SERIAL PRIMARY KEY,
  user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
  role_type user_role_type NOT NULL, -- 'mentor', 'mentee', 'admin'
  is_active BOOLEAN DEFAULT TRUE,
  activated_at TIMESTAMP DEFAULT NOW(),
  verified_at TIMESTAMP,
  activation_step INTEGER DEFAULT 0,
  UNIQUE(user_id, role_type)
);

Comprehensive Mentor Profiles

CREATE TABLE mentor_profiles (
  id SERIAL PRIMARY KEY,
  user_id INTEGER UNIQUE REFERENCES users(id) ON DELETE CASCADE,
  expertise_areas JSONB, -- Array of expertise areas
  years_experience INTEGER,
  company VARCHAR(200),
  job_title VARCHAR(200),
  bio TEXT,
  max_mentees INTEGER DEFAULT 3,
  current_mentees_count INTEGER DEFAULT 0,
  is_accepting_mentees BOOLEAN DEFAULT TRUE,
  verified_at TIMESTAMP,
  verified_by INTEGER REFERENCES users(id)
);

Dynamic Mentee Profiles

CREATE TABLE mentee_profiles (
  id SERIAL PRIMARY KEY,
  user_id INTEGER UNIQUE REFERENCES users(id) ON DELETE CASCADE,
  learning_goals JSONB, -- Array of learning objectives
  career_stage VARCHAR(100),
  preferred_expertise_areas JSONB,
  preferred_meeting_frequency VARCHAR(50),
  current_challenge TEXT,
  profile_completed_at TIMESTAMP
);

Advanced Mentorship Relationships

CREATE TABLE mentorship_relationships (
  id SERIAL PRIMARY KEY,
  mentor_user_id INTEGER REFERENCES users(id),
  mentee_user_id INTEGER REFERENCES users(id),
  status relationship_status DEFAULT 'pending', -- 'pending', 'active', 'paused', 'completed', 'rejected'
  started_at TIMESTAMP,
  ended_at TIMESTAMP,
  paused_at TIMESTAMP,
  meeting_frequency VARCHAR(50),
  next_meeting_date TIMESTAMP,
  relationship_goals TEXT,
  mentor_notes TEXT,
  mentee_notes TEXT,
  created_at TIMESTAMP DEFAULT NOW()
);

Sophisticated Meeting Management

CREATE TABLE meetings (
  id SERIAL PRIMARY KEY,
  relationship_id INTEGER REFERENCES mentorship_relationships(id),
  scheduled_at TIMESTAMP NOT NULL,
  duration_minutes INTEGER DEFAULT 60,
  meeting_type meeting_type DEFAULT 'regular', -- 'intro', 'regular', 'milestone', 'final'
  status meeting_status DEFAULT 'scheduled', -- 'scheduled', 'completed', 'cancelled', 'no_show'
  topics_discussed JSONB, -- Array of discussion topics
  goals_set JSONB, -- Array of goals established
  action_items JSONB, -- Array of action items with deadlines
  mentor_notes TEXT,
  mentee_feedback TEXT,
  rating INTEGER,
  actual_start_time TIMESTAMP,
  actual_end_time TIMESTAMP
);

Flexible Event System

CREATE TABLE events (
  id SERIAL PRIMARY KEY,
  title VARCHAR(200) NOT NULL,
  description TEXT,
  event_type event_type NOT NULL, -- 'workshop', 'networking', 'training', 'social', 'thrive'
  start_time TIMESTAMP NOT NULL,
  end_time TIMESTAMP NOT NULL,
  location_type location_type NOT NULL, -- 'online', 'in_person', 'hybrid'
  capacity INTEGER,
  current_registrations INTEGER DEFAULT 0,
  is_members_only BOOLEAN DEFAULT FALSE,
  required_membership_tier membership_tier,
  created_by INTEGER REFERENCES users(id)
);

Membership & Access Control

CREATE TABLE user_memberships (
  id SERIAL PRIMARY KEY,
  user_id INTEGER UNIQUE REFERENCES users(id) ON DELETE CASCADE,
  tier membership_tier DEFAULT 'free', -- 'free', 'basic', 'premium'
  expires_at TIMESTAMP,
  features_access JSONB, -- Dynamic feature permissions
  last_payment_at TIMESTAMP,
  next_billing_date TIMESTAMP,
  cancelled_at TIMESTAMP,
  created_at TIMESTAMP DEFAULT NOW(),
  updated_at TIMESTAMP DEFAULT NOW()
);

🚢 Deployment

Important

Choose the deployment strategy that best fits your needs. Vercel deployment is recommended for optimal performance.

graph TB
    subgraph "Local Development"
        L1[pnpm dev]
        L2[localhost:3000]
    end
    
    subgraph "Cloud Deployment"
        C1[Vercel]
        C2[Railway]
        C3[Render]
        C4[Netlify]
    end
    
    subgraph "Container Deployment"
        D1[Docker]
        D2[Docker Compose]
        D3[Kubernetes]
    end
    
    L1 --> L2
    C1 --> |Recommended| Production
    D1 --> D2
    D2 --> D3
Loading

Vercel Deployment (Recommended)

  1. Fork and import repository

    • Fork this repository to your GitHub account
    • Import to Vercel: vercel.com/new
  2. Configure environment variables

    • Add all variables from .env.local to Vercel dashboard
    • Set up production database URL
  3. Deploy

    • Vercel automatically builds and deploys on push to main

Manual Deployment

  1. Build the application

    pnpm build
  2. Set production environment variables

    export NODE_ENV=production
    export DATABASE_URL="your-production-db-url"
    # Add other production variables
  3. Run database migrations

    # Create pre-deployment snapshot
    pnpm db:snapshot "pre-deployment-$(date +%Y%m%d)"
    
    # Run migrations safely
    pnpm db:migrate:safe
  4. Start the production server

    pnpm start

Docker Deployment

FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install
COPY . .
RUN pnpm build

FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./
RUN npm install -g pnpm && pnpm install --prod
EXPOSE 3000
CMD ["pnpm", "start"]

🤝 Contributing

We welcome contributions from the community! Here's how you can help improve this project:

Development Process

flowchart TD
    A[Create Issue] --> B[Fork Repository]
    B --> C[Create Feature Branch]
    C --> D[Develop Feature]
    D --> E[Write Tests]
    E --> F[Update Documentation]
    F --> G[Run Linting]
    G --> H{All Checks Pass?}
    H -->|No| D
    H -->|Yes| I[Create Pull Request]
    I --> J[Code Review]
    J --> K{Review Approved?}
    K -->|No| D
    K -->|Yes| L[Merge to Main]
    L --> M[Deploy to Production]
Loading

Contribution Steps

  1. Fork the repository

    git clone https://github.com/NZ-SheSharp/she-sharp.git
  2. Create a feature branch

    git checkout -b feature/amazing-feature
  3. Make your changes

    • Follow the existing code style
    • Write meaningful commit messages
    • Add tests for new features
  4. Commit your changes

    git commit -m "feat: add amazing feature"
  5. Push to your branch

    git push origin feature/amazing-feature
  6. Open a Pull Request

    • Provide a clear description of changes
    • Link any related issues
    • Ensure all tests pass

Commit Convention

We follow the Conventional Commits specification:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • test: Test additions or changes
  • chore: Maintenance tasks

Code Style

  • TypeScript: Use strict mode and proper typing
  • React: Functional components with hooks
  • Formatting: Prettier with default settings
  • Linting: ESLint with Next.js configuration

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙋‍♀️ Author

Chan Meng

👥 Contributors

📞 Contact

Organization Contact

Developer Contact

Support

For support, please:

  1. Check the Documentation
  2. Search existing issues
  3. Create a new issue

🙏 Acknowledgments

Special Thanks To

  • Our Mentors: 18 dedicated professionals sharing their expertise
  • Corporate Partners: 50+ organizations supporting our mission
  • Community Members: 1000+ women driving change in STEM
  • Volunteers: Countless hours contributed to our cause

Technologies & Resources

Inspiration

This project was inspired by the need to create equal opportunities for women in STEM fields and build a supportive community for professional growth.

🚨 Troubleshooting

🔧 Common Issues & Solutions

Installation Issues

Node.js Version Conflicts:

# Check Node.js version
node --version

# Use Node Version Manager (nvm)
nvm install 20
nvm use 20

Package Installation Failures:

# Clear pnpm cache
pnpm store prune

# Delete node_modules and reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm install

Development Issues

Port Already in Use:

# Find process using port 3000
lsof -i :3000

# Kill the process
kill -9 <PID>

# Or use a different port
pnpm dev --port 3001

Environment Variables Not Loading:

[!WARNING] Make sure your .env.local file is in the project root and variables are prefixed with NEXT_PUBLIC_ for client-side access.

Database Issues

Connection Failed:

  • Verify PostgreSQL is running
  • Check connection string format
  • Ensure database exists
  • Verify user permissions

Migration Errors:

# Check migration status first
pnpm db:status

# Create backup before troubleshooting
pnpm db:snapshot "before-fix"

# Reset database (if needed) - Note: db:reset command not available
# Instead, manually drop and recreate database, then:
pnpm db:setup
pnpm db:migrate

# Regenerate migrations
pnpm db:generate
pnpm db:migrate

Version Control Issues:

# View migration history
pnpm db:history

# List available snapshots
pnpm db:version list-snapshots

# Generate rollback SQL
pnpm db:version rollback-sql <migration-tag>

Production Issues

Build Failures:

# Check for TypeScript errors
pnpm type-check

# Check for linting errors
pnpm lint

# Clear Next.js cache
rm -rf .next
pnpm build

📚 FAQ

❓ Frequently Asked Questions

Q: Can I use this project for my organization? A: Yes! This project is open source under MIT license. Feel free to fork and customize it for your needs.

Q: How does the dual-role system work? A: Users can independently activate mentor and mentee roles. For example, a mid-level engineer can mentor junior developers while being mentored by senior architects. This creates a dynamic learning ecosystem where everyone both teaches and learns.

Q: Can someone be both a mentor and mentee simultaneously? A: Absolutely! This is one of our platform's unique features. Users can guide others in areas where they excel while learning from experts in different domains. The dashboard automatically adapts to show relevant information for each active role.

Q: How does the mentor-mentee matching process work? A:

  1. Mentees browse verified mentor profiles with detailed expertise and availability
  2. Mentees apply with specific goals and challenges they want to address
  3. Mentors review applications and can approve or decline based on fit and capacity
  4. Once approved, both parties can schedule their first meeting and set relationship goals

Q: What happens if I want to switch from mentee to mentor role? A: You can activate the mentor role at any time through your dashboard. You'll need to complete your mentor profile with expertise areas, experience, and availability. After verification, you can start accepting mentee applications while maintaining any existing mentee relationships.

Q: How do I add custom branding? A: Update the colors in tailwind.config.ts, replace logos in /public/logos, and modify the site metadata in app/layout.tsx.

Q: Is the AI chatbot required? A: No, the chatbot is optional. You can disable it by removing the <Chatbot /> component from the layout.

Q: Does this project support payments? A: Payment features have been removed from the codebase for security reasons. The platform focuses on community features, mentorship, and events. If you need payment functionality, you can integrate your own payment provider following Next.js best practices.

Q: What's the difference between membership tiers? A:

  • Free: Basic access to mentors, public resources, and free events
  • Basic/Premium: Priority matching, exclusive events, advanced resources, extended meeting features, and detailed analytics

Q: Can I deploy this to other platforms besides Vercel? A: Yes! The project can be deployed to any platform that supports Next.js, including Railway, Render, AWS, or self-hosted servers.

Q: How do I manage database migrations safely? A: The project includes a comprehensive database version control system:

  1. Always check status before migrations: pnpm db:status
  2. Create snapshots before major changes: pnpm db:snapshot "description"
  3. Use safe migration: pnpm db:migrate:safe (creates automatic backup)
  4. Create checkpoints for stable versions: pnpm db:version checkpoint "v1.0"
  5. Review the Database Version Control Guide

Q: How do I rollback database changes? A:

  1. List available snapshots: pnpm db:version list-snapshots
  2. Generate rollback SQL: pnpm db:version rollback-sql <migration-tag>
  3. For complex rollbacks, restore from snapshots following the guide
  4. Always test rollback procedures in staging first

Q: How do I contribute to the project? A: Please read our Contributing Guidelines and follow the development process. We welcome all contributions!

Q: Where can I get help? A:


🚀 Building the Future of Diversity in STEM 🌟

Empowering women in technology worldwide



Star us on GitHub • 📖 Read the Docs • 🐛 Report Issues • 💡 Request Features • 🤝 Contribute


Built with ❤️ by Chan Meng


Live Site · GitHub · LinkedIn · Portfolio



GitHub stars GitHub forks GitHub watchers

About

【Building Diversity in Tech ⭐ Give us a star!】Production-ready Next.js 15 platform with TypeScript, PostgreSQL, and Drizzle ORM. Features include JWT auth, Stripe subscriptions, Google Gemini AI integration, shadcn/ui components, and responsive design.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors