Frontend Stack
Next.js, React, and UI components
CodePlanet's frontend is built with modern web technologies designed for performance, developer experience, and maintainability.
Technology Overview
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 14+ | React framework with App Router |
| React | 19 | UI library |
| TypeScript | 5.x | Type safety |
| Tailwind CSS | 3.x | Utility-first styling |
| shadcn/ui | Latest | Component library |
| Framer Motion | 11.x | Animations |
| Lucide Icons | Latest | Icon library |
Next.js App Router
We use the Next.js 14+ App Router for routing and layouts:
Route Groups
Route groups (name) organize routes without affecting URLs:
(auth)— Login/signup pages without main layout(marketing)— Public pages with marketing layout(dashboard)— Protected pages with app layout
Server vs Client Components
By default, components are Server Components:
Add "use client" for interactivity:
Component Architecture
UI Primitives (/components/ui/)
Base components from shadcn/ui:
Feature Components
Organized by feature/domain:
Component Patterns
Compound Components:
Render Props:
Composition:
Styling with Tailwind
We use Tailwind CSS with custom configuration:
Theme Colors
Common Patterns
CSS Variables
Animations with Framer Motion
Basic Animation
Spring Animations
AnimatePresence
Reduced Motion
Always respect user preferences:
State Management
Local State
For component-level state:
React Context
For shared state across components:
URL State
For persistent, shareable state:
Data Fetching
Server Components (Preferred)
Client-Side
Performance Optimizations
Code Splitting
Dynamic imports for heavy components:
Image Optimization
Memoization
Next Steps
- Backend Services — API architecture
- Data Flow — How data moves through the app
- Dashboard — Dashboard architecture