Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

180 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PremedProfiles

A comprehensive web application designed to help pre-medical students navigate their journey to medical school through successful applicant profiles, application guidance, and premium resources.

🎯 Overview

PremedProfiles provides pre-medical students with:

  • Real applicant profiles from students who were accepted to medical schools
  • Application guidance including personal statement templates and activity descriptions
  • Premium resources like cold email templates, CV templates, and MCAT study schedules
  • Medical school database with acceptance statistics and student profiles

πŸš€ Features

Core Features

  • Applicant Profile Database: Browse profiles of successful medical school applicants
  • Medical School Explorer: Search and filter medical schools with acceptance data
  • Interactive Profile Cards: Detailed breakdown of GPA, MCAT, activities, and reflections
  • School-specific Profiles: View which students were accepted to specific medical schools

Premium Features (Cheatsheet+)

  • βœ… Cold email templates for research opportunities
  • βœ… Professional CV template optimized for medical school applications
  • βœ… Pre-med summer program database
  • βœ… MCAT-optimized course schedules and study plans

Application Resources

  • πŸ“ Personal statement writing guide
  • πŸ“ Activity section description templates
  • πŸ“ Letter of recommendation email templates
  • πŸ“ General application strategy guides

User Management

  • πŸ” Firebase Authentication with email verification
  • πŸ’³ Stripe payment integration for subscriptions
  • πŸ‘€ User profile management with payment methods and addresses
  • πŸ“Š Order history and subscription management

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern React with hooks and functional components
  • React Router DOM 7 - Client-side routing
  • Sass/SCSS - Styling with variables and mixins
  • Responsive Design - Mobile-first approach

Backend & Services

  • Firebase
    • Authentication (email/password, email verification)
    • Firestore (user profiles, orders, subscriptions)
    • Storage (file uploads)
  • Stripe - Payment processing and subscription management
  • Google Docs API - Embedded document viewing

Development Tools

  • Create React App - Development environment
  • ESLint - Code linting
  • Git - Version control

πŸ“ Project Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ auth/                    # Authentication components
β”‚   β”‚   β”œβ”€β”€ AuthModal.js         # Login/signup modal
β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.js    # Route protection
β”‚   β”‚   β”œβ”€β”€ PlanBasedRoute.js    # Subscription-based routing
β”‚   β”‚   └── PaymentVerifiedRoute.js
β”‚   β”œβ”€β”€ layout/                  # Layout components
β”‚   β”‚   β”œβ”€β”€ Navbar/              # Navigation bar
β”‚   β”‚   └── Footer/              # Footer component
β”‚   β”œβ”€β”€ sections/                # Page sections
β”‚   β”‚   β”œβ”€β”€ Hero/                # Landing page hero
β”‚   β”‚   β”œβ”€β”€ ProfileCard/         # Applicant profile cards
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ payment/                 # Payment components
β”‚   β”‚   β”œβ”€β”€ StripeWrapper.js     # Stripe integration
β”‚   β”‚   β”œβ”€β”€ PricingCards.js      # Subscription plans
β”‚   β”‚   └── SavedPaymentMethods.js
β”‚   └── common/                  # Reusable components
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ Home/                    # Landing page
β”‚   β”œβ”€β”€ Profile/                 # Main dashboard
β”‚   β”œβ”€β”€ Checkout/                # Payment flow
β”‚   β”œβ”€β”€ Account/                 # User account management
β”‚   β”œβ”€β”€ Admin/                   # Admin panel
β”‚   └── ApplicationCheatsheet/   # Application resources
β”œβ”€β”€ services/                    # API services
β”‚   β”œβ”€β”€ paymentService.js        # Payment processing
β”‚   β”œβ”€β”€ userService.js           # User data management
β”‚   └── api.js                   # External API calls
β”œβ”€β”€ utils/                       # Utility functions
β”‚   β”œβ”€β”€ profilesData.js          # Profile data processing
β”‚   └── countries.js             # Country data
β”œβ”€β”€ contexts/                    # React contexts
β”‚   └── AuthContext.js           # Authentication state
β”œβ”€β”€ firebase/                    # Firebase configuration
β”‚   β”œβ”€β”€ config.js                # Firebase setup
β”‚   └── authService.js           # Authentication services
└── styles/                      # Global styles
    β”œβ”€β”€ main.scss                # Main stylesheet
    β”œβ”€β”€ variables.scss           # SCSS variables
    └── mixins.scss              # SCSS mixins

πŸ—οΈ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Firebase project
  • Stripe account

Environment Variables

Create a .env file in the root directory:

# Firebase Configuration
REACT_APP_FIREBASE_API_KEY=your_api_key
REACT_APP_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
REACT_APP_FIREBASE_APP_ID=your_app_id

# Stripe Configuration
REACT_APP_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_key

Installation Steps

  1. Clone the repository

    git clone <repository-url>
    cd premedcheatsheet-new
  2. Install dependencies

    npm install
  3. Set up Firebase

    • Create a Firebase project
    • Enable Authentication (Email/Password)
    • Create Firestore database
    • Add your configuration to .env
  4. Set up Stripe

    • Create a Stripe account
    • Get your publishable key
    • Add to .env file
  5. Start development server

    npm start

πŸ—„οΈ Database Schema

Firestore Collections

Users Collection (users)

{
  uid: "user_id",
  email: "user@example.com",
  firstName: "John",
  lastName: "Doe",
  emailVerified: true,
  paymentVerified: true,
  createdAt: "2025-01-01T00:00:00.000Z",
  subscriptions: [
    {
      plan: "cheatsheet-plus",
      startDate: "2025-01-01T00:00:00.000Z",
      endDate: "2026-01-01T00:00:00.000Z",
      active: true,
      orderId: "order_123"
    }
  ],
  orders: [
    {
      orderId: "order_123",
      plan: "cheatsheet-plus",
      planName: "The Cheatsheet+",
      amount: 29.99,
      status: "completed",
      createdAt: "2025-01-01T00:00:00.000Z"
    }
  ],
  paymentMethods: [
    {
      id: "pm_123",
      cardType: "visa",
      lastFourDigits: "4242",
      expiryDate: "12/25",
      cardholderName: "John Doe",
      isDefault: true
    }
  ],
  addresses: [
    {
      id: "addr_123",
      name: "John Doe",
      line1: "123 Main St",
      city: "New York",
      state: "NY",
      postalCode: "10001",
      country: "United States",
      isDefault: true
    }
  ]
}

Orders Collection (orders)

{
  orderId: "order_123",
  userId: "user_id",
  amount: 29.99,
  plan: "cheatsheet-plus",
  status: "completed",
  paymentMethodId: "pm_stripe_123",
  createdAt: "2025-01-01T00:00:00.000Z",
  completedAt: "2025-01-01T00:00:00.000Z"
}

πŸ’³ Subscription Plans

Plan Price Features
The Cheatsheet $14.99 Applicant profiles access
The Cheatsheet+ $29.99 Profiles + premium resources
Application Cheatsheet $19.99 Application writing guides
Application Cheatsheet+ $34.99 Complete access to all features

πŸ” Authentication Flow

  1. Guest Access: 24-hour trial access
  2. Registration: Data collection (account created after payment)
  3. Email Verification: Required for full access
  4. Payment: Stripe integration with saved payment methods
  5. Subscription Management: Plan-based route protection

🚦 Route Protection

  • Public Routes: Home, About, Pricing
  • Payment Verified: Requires active subscription
  • Plan-Based: Different content based on subscription level
  • Admin Routes: Admin panel access control

🎨 Styling System

  • SCSS Architecture: Variables, mixins, and modular styles
  • Responsive Design: Mobile-first approach
  • Design System: Consistent spacing, typography, and colors
  • Component Styles: Co-located SCSS files

πŸ§ͺ Testing

# Run tests
npm test

# Run tests with coverage
npm test -- --coverage

πŸš€ Deployment

Build for Production

npm run build

Environment Setup

  • Configure production environment variables
  • Set up Firebase hosting or your preferred hosting service
  • Configure domain and SSL certificates

πŸ“Š Analytics & Monitoring

  • Firebase Analytics integration
  • Error tracking and monitoring
  • Performance monitoring with Web Vitals

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“ License

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

πŸ“ž Support

For support and questions:

πŸ”„ Recent Updates

  • βœ… Fixed duplicate order creation bug
  • βœ… Implemented proper payment flow (account creation after payment)
  • βœ… Added plan-based route protection
  • βœ… Enhanced subscription management
  • βœ… Improved mobile responsiveness
  • βœ… Added email verification system

Built with ❀️ for pre-medical students pursuing their dreams of becoming physicians.

Releases

Packages

Used by

Contributors

Languages