์๊ฐ
Building Open Source Tech Education App For ๐ฎ๐ณ
์น ๋ฐ ์ฑ ๊ฐ๋ฐ์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- ๊ธฐ๋ก ์์ง ์ค
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
Original๐ TBE Platform
A comprehensive Turborepo monorepo housing all The Boring Education frontend applications, shared packages, and centralized configurations.
๐๏ธ Architecture Overview
tbe-platform/
โโโ apps/ # ๐ฑ Applications
โ โโโ platform/ # ๐ Main TBE platform (Port: 3000)
โ โโโ prep-yatra/ # ๐งญ Interview preparation tool (Port: 3001)
โ โโโ quizes/ # ๐ง Quiz platform (Port: 3002)
โ โโโ onboarding/ # ๐ฏ User onboarding flow (Port: 3003)
โ โโโ api/ # ๐ Centralized API service (Port: 3004)
โ โโโ techyatra/ # ๐ ๏ธ Tech learning journey
โ โโโ dsayatra/ # ๐ DSA practice platform
โ โโโ resume-yatra/ # ๐ Resume builder
โ โโโ testing/ # ๐งช Testing suite (unit, API, E2E)
โโโ packages/ # ๐ฆ Shared Packages
โ โโโ components/ # ๐
Shared UI components
โ โโโ hooks/ # ๐ฃ Shared React hooks
โ โโโ utils/ # โ๏ธ Shared utilities
โ โโโ types/ # ๐ TypeScript types
โ โโโ constants/ # ๐ Shared constants
โ โโโ services/ # ๐ API services
โ โโโ auth/ # ๐ Authentication logic
โ โโโ interface/ # ๐ Interface definitions
โ โโโ config/ # โ๏ธ Shared configurations
โ โโโ eslint-config/ # ๐ ESLint configurations
โ โโโ typescript-config/ # ๐ง TypeScript configurations
โโโ .github/workflows/ # ๐ค CI/CD workflows
๐ ๏ธ Prerequisites
- Node.js: >= 20.x
- pnpm: >= 9.12.0 (Install:
npm install -g [email protected]) - MongoDB: For database operations (local or cloud)
๐ Quick Start
1. Clone & Install
# Clone the repository
git clone <repository-url>
cd tbe-platform
# Install all dependencies
pnpm install
2. Environment Setup
Copy the environment template and configure your variables:
# Copy environment template
cp .env.example .env.local
# Edit with your actual values
# Required: MONGODB_URI, NEXTAUTH_SECRET, etc.
3. Development
# Start all applications
pnpm dev
# Or run individual apps
pnpm dev:platform # Main platform (localhost:3000)
pnpm dev:prep-yatra # Prep Yatra (localhost:3001)
pnpm dev:quizes # Quizes (localhost:3002)
pnpm dev:onboarding # Onboarding (localhost:3003)
pnpm dev:api # API service (localhost:3004)
pnpm dev:techyatra # Tech Yatra
pnpm dev:dsayatra # DSA Yatra
pnpm dev:resume-yatra # Resume Yatra
๐ฆ Applications
| App | Port | Framework | Description |
|---|---|---|---|
| platform | 3000 | Next.js | Main TBE platform with courses, projects, interviews |
| prep-yatra | 3001 | Next.js | Comprehensive interview preparation platform |
| quizes | 3002 | Next.js | Interactive quiz platform with analytics |
| onboarding | 3003 | Vite + React | User onboarding and registration flow |
| api | 3004 | Next.js API | Centralized API service for all apps |
| techyatra | - | Next.js | Technology learning roadmaps |
| dsayatra | - | Next.js | Data structures & algorithms practice |
| resume-yatra | - | Next.js | Professional resume builder |
๐ง Development Commands
Building
# Build all applications
pnpm build
# Build specific apps
pnpm build:platform
pnpm build:prep-yatra
pnpm build:quizes
pnpm build:onboarding
pnpm build:api
Code Quality
# Lint all packages
pnpm lint
# Format code
pnpm format
# Type checking
pnpm check-types
Package Management
# Install dependencies for all packages
pnpm install
# Add dependency to specific app
pnpm --filter @tbe/platform add <package>
# Add dependency to workspace root
pnpm add -w <package>
๐ Shared Packages
All applications use these shared packages:
@tbe/components- 300+ UI components (buttons, modals, forms, etc.)@tbe/hooks- 30+ React hooks (auth, API, analytics, etc.)@tbe/utils- Utilities (auth, database, API helpers)@tbe/types- TypeScript interfaces and types@tbe/constants- Shared constants and configurations@tbe/services- API service functions@tbe/auth- Authentication logic and components
Usage Example
// Import UI components
import { Button, Card, Modal } from "@tbe/components";
// Import hooks
import { useAuth, useApi } from "@tbe/hooks";
// Import utilities
import { connectToDatabase, sendRequest } from "@tbe/utils";
// Import types
import { User, APIResponse } from "@tbe/types";
๐ Deployment
Each app, including the API, deploys on Vercel with automatic builds on push.
๐ค CI/CD
GitHub Actions automatically run on PRs to development and production:
- Build Check: Ensures all apps build successfully
- Lint Check: Code quality and formatting validation
- Type Check: TypeScript type safety verification
๐ Environment Variables
Shared Variables (Root .env.local)
# Database
MONGODB_URI=mongodb://localhost:27017/tbe-platform
# Authentication
NEXTAUTH_SECRET=your-secret-key
GOOGLE_AUTH_CLIENT_ID=your-google-client-id
GOOGLE_AUTH_CLIENT_SECRET=your-google-client-secret
# External APIs
OPENAI_API_KEY=your-openai-key
YOUTUBE_API_KEY=your-youtube-key
# Payment
CASHFREE_CLIENT_ID=your-cashfree-id
CASHFREE_SECRET_KEY=your-cashfree-secret
# Monitoring
NEXT_PUBLIC_SENTRY_DSN=your-sentry-dsn
App-Specific Variables
Each app can override shared variables with its own .env.local file.
๐ SEO & Indexability
Automated SEO tooling for all TBE apps.
SEO Auditing
# Run Lighthouse SEO audit locally (requires apps running)
pnpm seo:audit
# Run against production URLs
pnpm seo:audit:prod
Sitemap Generation
Sitemaps and robots.txt are automatically generated during build via next-sitemap:
# Build any app - sitemap is generated in postbuild
pnpm build:platform
# Output: public/sitemap.xml, public/robots.txt
SEO Inspector
Visual dashboard for monitoring SEO health across all apps:
# Start the SEO Inspector
cd apps/testing
pnpm dev
# Open http://localhost:3099/seo
Features:
- View Lighthouse scores for all apps
- Validate meta tags for any URL
- Monitor route priorities and indexing status
- Track SEO improvements over time
JSON-LD Structured Data
The SEO component supports rich snippets via JSON-LD:
import { SEO } from "@tbe/components"
// Course page with structured data
<SEO
seoMeta={seoMeta}
schema={{
type: "Course",
course: {
name: "JavaScript Basics",
description: "Learn JavaScript from scratch",
skillLevel: "Beginner"
}
}}
/>
// FAQ page
<SEO
seoMeta={seoMeta}
schema={{
type: "FAQPage",
faq: [
{ question: "What is React?", answer: "A JavaScript library..." }
]
}}
/>
CI/CD Integration
Lighthouse audits run automatically:
- On every push to
productionbranch - Weekly on Monday at 6 AM UTC
- Manual trigger via GitHub Actions
Thresholds:
- SEO: 85% minimum (fails build if below)
- Accessibility: 80% warning
- Best Practices: 75% warning
๐งช Testing
Comprehensive testing suite with Vitest and MSW located in apps/testing/.
# Run all tests
pnpm test
# Development workflow
pnpm test:unit:watch # Watch mode (fast feedback)
pnpm test:unit # Unit tests (components, hooks, utils)
pnpm test:api # API endpoint tests
pnpm test:coverage # Generate coverage report
Coverage Requirements: 70% statements, 65% branches
CI/CD: Tests run automatically on PRs to development and production branches.
Documentation: See apps/testing/README.md for detailed guide
Code stability backlog: Refactor, quality, and test expansion tasks live in docs/code-stability.md (checkboxes for parallel work).
๐ Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Development Guidelines
- Follow the existing code style and conventions
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all CI checks pass
Adding a New App
- Create app directory in
apps/ - Configure
package.jsonwith shared packages - Add scripts to root
package.json - Update this README with app details
๐ Troubleshooting
Common Issues
Build Failures:
# Clear all node_modules and reinstall
pnpm clean
pnpm install
Port Conflicts:
# Kill processes on specific ports
npx kill-port 3000 3001 3002 3003 3004
TypeScript Errors:
# Clear TypeScript cache
pnpm clean
pnpm check-types
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check individual app README files
Built with โค๏ธ by The Boring Education Team
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ