Professional railway development website built with Next.js 16, TypeScript, and TailwindCSS
- π¨ Modern SaaS UI - Clean, professional design with blue-gray color palette
- π Dark Mode - Full dark mode support with localStorage persistence
- π± Responsive - Mobile-first design (phone, tablet, desktop)
- β‘ Performance - React 19 with React Compiler enabled
- π― Redux Toolkit - Centralized state management
- π§© Component Library - Reusable UI components (Button, Card, Container)
- β Production Ready - Zero linter errors, successful build
# Install dependencies
npm install
# Run development server
npm run dev
# Open http://localhost:3000
# Build for production
npm run build
# Start production server
npm start| Route | Description |
|---|---|
/ |
Home page with hero, stats, features |
/about |
Company mission, vision, and story |
/expertise |
Service areas and capabilities |
/projects |
Completed and ongoing projects |
/stories |
Blog/insights section |
src/
βββ app/
β βββ layout.tsx # Root layout with Navbar
β βββ page.tsx # Home page
β βββ about/page.tsx # About page
β βββ expertise/page.tsx # Expertise page
β βββ projects/page.tsx # Projects page
β βββ stories/page.tsx # Stories page
βββ components/
β βββ layout/
β β βββ Navbar.tsx # Navigation with theme toggle
β βββ providers/
β β βββ Providers.tsx # Redux provider
β βββ ui/
β βββ Button.tsx # Button component
β βββ Card.tsx # Card container
β βββ Container.tsx # Max-width container
βββ redux/
β βββ appSlice.ts # App state slice
βββ lib/
βββ store.ts # Redux store config
βββ utils.ts # Utility functions (cn)
- Primary: #005BAA (TCDD Blue)
- Gray Scale: 50-950
- Dark Mode: Full support with
dark:classes
- Font: Inter
- Headings: Bold, tracking-tight
- Body: text-base
- Scale: 8px grid (0, 8px, 16px, 24px, 32px, 40px, 48px)
- Max Width: 1280px (max-w-7xl)
import { Button } from '@/components/ui/Button';
<Button variant="primary" size="md">
Click Me
</Button>
// Variants: primary, secondary, outline, ghost
// Sizes: sm, md, lgimport { Card } from '@/components/ui/Card';
<Card>
<h3>Card Title</h3>
<p>Card content...</p>
</Card>import { Container } from '@/components/ui/Container';
<Container>
<div>Centered content with max-width</div>
</Container>Dark mode is implemented with:
- TailwindCSS
dark:classes localStoragepersistence- Theme toggle in Navbar (moon/sun icon)
- System preference detection on first load
The app uses Redux Toolkit for state management:
// src/redux/appSlice.ts
interface AppState {
theme: 'light' | 'dark';
sidebarOpen: boolean;
}Access state in components:
import { useSelector } from 'react-redux';
import { RootState } from '@/lib/store';
const theme = useSelector((state: RootState) => state.app.theme);- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: TailwindCSS v4
- State: Redux Toolkit
- Compiler: React Compiler (enabled)
- Node: v18+
Located at tailwind.config.ts:
- Custom primary color palette
- Dark mode:
classstrategy - 8px spacing scale
- Inter font family
Located at next.config.ts:
- React Compiler enabled
- TypeScript strict mode
Breakpoints:
sm: 640pxmd: 768pxlg: 1024pxxl: 1280px2xl: 1536px
Mobile-first approach with TailwindCSS responsive utilities.
- β TypeScript strict mode
- β No linter errors
- β Build successful
- β All pages functional
- β Dark mode working
- β Responsive tested
- β Redux integrated
Build the project:
npm run buildThe output will be in .next folder, ready for deployment to:
- Vercel (recommended)
- Any Node.js hosting
- Docker container
- Create a new folder in
src/app/:
mkdir -p src/app/my-page- Add
page.tsx:
export default function MyPage() {
return (
<div>
<h1>My New Page</h1>
</div>
);
}- The route will be available at
/my-page
- Create in
src/components/ui/:
// src/components/ui/MyComponent.tsx
export function MyComponent() {
return <div>Component</div>;
}- Import and use:
import { MyComponent } from '@/components/ui/MyComponent';- Hot Reload: Changes auto-reload in dev mode
- TypeScript: Use strict types for better DX
- Tailwind: Use className instead of style
- Components: Keep them reusable and atomic
- Redux: Only for global state, local state with useState
Β© 2024 RailHubDev. All rights reserved.
Built with β€οΈ using Next.js 16, TypeScript, and TailwindCSS