A modern, scalable online learning platform built with Next.js 15, TypeScript, and Tailwind CSS.
- Modern Tech Stack: Next.js 15, TypeScript, Tailwind CSS
- Responsive Design: Mobile-first approach with beautiful UI
- Authentication System: Complete auth flow with context management
- Component Library: Reusable UI components with consistent design
- Type Safety: Full TypeScript coverage for better development experience
- Performance Optimized: Built with Next.js App Router and optimized for speed
global-classrooms-app/
βββ app/ # Next.js App Router
β βββ components/ # Reusable components
β β βββ ui/ # Base UI components (Button, Input, etc.)
β β βββ layout/ # Layout components (Header, Footer)
β β βββ forms/ # Form components
β β βββ cards/ # Card components
β β βββ sections/ # Page sections (Hero, Features, etc.)
β βββ context/ # React Context providers
β βββ hooks/ # Custom React hooks
β βββ services/ # API services and external integrations
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions and helpers
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ lib/ # Shared libraries and utilities
βββ public/ # Static assets
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ README.md # Project documentation
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS v4
- State Management: React Context + Custom Hooks
- HTTP Client: Fetch API with custom service layer
- Code Quality: ESLint, TypeScript strict mode
- Package Manager: npm
- Node.js 18.18.0 or higher
- npm 8.19.3 or higher
- Clone the repository:
git clone <repository-url>
cd global-classrooms-app
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open http://localhost:3000 in your browser.
npm run dev
- Start development server with Turbopacknpm run build
- Build the application for productionnpm run start
- Start the production servernpm run lint
- Run ESLint to check code quality
The project uses a consistent design system with:
- Color Palette: Semantic colors (primary, secondary, accent, etc.)
- Typography: Geist Sans and Geist Mono fonts
- Spacing: Consistent spacing scale using Tailwind CSS
- Components: Reusable UI components with variants and sizes
Create a .env.local
file in the root directory:
NEXT_PUBLIC_API_URL=http://localhost:3001/api
The project uses strict TypeScript configuration with:
- Strict mode enabled
- Path mapping for clean imports
- Custom type definitions for better DX
Configured with:
- Custom color palette
- Responsive breakpoints
- Custom utilities and components
- Location: Place components in appropriate directories under
app/components/
- Naming: Use PascalCase for component names
- Props: Define TypeScript interfaces for all props
- Styling: Use Tailwind CSS classes with consistent patterns
- Accessibility: Include proper ARIA labels and semantic HTML
import React from 'react';
import { cn } from '@/lib/utils';
interface ComponentProps {
// Define props here
}
const Component: React.FC<ComponentProps> = ({ /* props */ }) => {
return (
// JSX here
);
};
export default Component;
The app includes a complete authentication system:
- Context Provider:
AuthContext
manages user state - Custom Hooks:
useAuth
for easy access to auth functions - Local Storage: Persistent user sessions
- Type Safety: Full TypeScript support for auth types
- Service Layer: Centralized API calls in
app/services/
- Type Safety: API responses are fully typed
- Error Handling: Consistent error handling across all requests
- Environment Config: Configurable API endpoints
The application is built with a mobile-first approach:
- Breakpoints: Tailwind CSS responsive utilities
- Flexible Layouts: CSS Grid and Flexbox for layouts
- Touch-Friendly: Optimized for mobile interactions
- Performance: Optimized images and lazy loading
To add testing to the project:
- Install testing dependencies:
npm install --save-dev jest @testing-library/react @testing-library/jest-dom
- Create test files alongside components
- Run tests with
npm test
- Push your code to GitHub
- Connect your repository to Vercel
- Deploy automatically on every push
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Create an issue in the repository
- Check the documentation
- Review the code examples
Built with β€οΈ using Next.js, TypeScript, and Tailwind CSS