Try TypeScript is an interactive platform for learning TypeScript. The project aims to help people enter the world of programming through hands-on, engaging TypeScript lessons.
- 150 interactive lessons (Portuguese + English)
- In-browser code execution
- Monaco Editor with syntax highlighting
- GitHub OAuth authentication
- Progress tracking with confetti celebrations
- Mobile-first responsive design
- Code: English
- Comments: English
- UI Translations: English and Portuguese (for lessons)
- Variable/Function Names: English (camelCase)
- TypeScript (strict mode)
- React 19
- Vite 8
- TailwindCSS 4
- Monaco Editor
- Cloudflare Workers (for OAuth)
# Install dependencies
npm install --legacy-peer-deps
# Start development server
npm run dev
# Build for production
npm run build
# Run linter (REQUIRED before commit)
npm run lint
# Auto-fix formatting (REQUIRED before commit)
npm run format
# Preview production build
npm run preview- Run
npm run lint- Must pass with 0 errors - Run
npm run format- Must pass with 0 errors - Test the build with
npm run build
- Use oxlint for linting
- Use oxfmt for formatting
- Follow TypeScript strict mode
- Use meaningful variable names
- Add comments for complex logic
Use conventional commits:
feat:for new featuresfix:for bug fixesdocs:for documentationchore:for maintenancerefactor:for code improvements
- Add lesson to
src/data/lessons/lessons.ts(Portuguese) - Add translation to
src/data/lessons/lessons-en.ts(English) - Add UI strings to
src/i18n/ptBR.tsandsrc/i18n/en.ts - Test locally
{
id: number, // Unique sequential ID
title: string, // Lesson title
level: "basic" | "medium" | "advanced",
content: string, // Explanation
task: string, // What user should do
hint: string, // Optional hint
starterCode: string // Initial code
}src/
├── App.tsx # Main application
├── callback.tsx # OAuth callback handler
├── main.tsx # Entry point
├── index.css # Global styles
├── data/lessons/ # Lesson content
│ ├── types.ts # Type definitions
│ ├── lessons.ts # Portuguese lessons
│ ├── lessons-en.ts # English lessons
│ └── index.ts # Export functions
└── i18n/ # Translations
├── index.ts # i18n logic
├── en.ts # English strings
└── ptBR.ts # Portuguese strings
When deploying, set these environment variables:
VITE_GITHUB_CLIENT_ID=your_github_client_id
VITE_AUTH_WORKER_URL=your_cloudflare_worker_url- Clear Vite cache:
rm -rf node_modules/.vite - Restart dev server
- Consider code splitting for Monaco Editor (future improvement)
- Ensure
tsc -bpasses before committing
For questions or contributions, open an issue on GitHub.