Transforming Dreams Into Reality
A modern, full-stack web application built for Baranwal Associates, a premier architectural design and construction firm. This project showcases a sophisticated tech stack with enterprise-grade tooling, comprehensive testing, and modern development practices.
This is a Next.js 15 application built with React 19, TypeScript, and Tailwind CSS 4. It features a modular architecture, internationalization support, real-time analytics, and a comprehensive testing suite.
- π’ Professional Portfolio: Showcase architectural projects with interactive carousel
- π Internationalization: Multi-language support (English/French) with Next-Intl
- π Authentication: Secure user management with Clerk
- π Analytics: Real-time user tracking with PostHog
- π¨ Modern UI: Beautiful, responsive design with ShadCN/UI components
- π± Mobile-First: Fully responsive design with touch gestures and accessibility
- ποΈ Database: PostgreSQL with Drizzle ORM and PGLite for local development
- π‘οΈ Security: Request rate limiting and protection with Arcjet
- π Monitoring: Error tracking and performance monitoring with Sentry
- β‘ Performance: Optimized build with bundle analysis and caching strategies
- Next.js 15 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript 5.8 - Strict type safety with comprehensive configuration
- Tailwind CSS 4 - Utility-first CSS framework
- PostgreSQL - Production database
- PGLite - Local development database
- Drizzle ORM - Type-safe database operations
- Drizzle Kit - Database migrations and management
- Clerk - Complete authentication solution
- Arcjet - Rate limiting and security protection
- Zod - Runtime type validation
- Bun - Fast JavaScript runtime and package manager
- ESLint - Code linting with comprehensive rules
- Lefthook - Git hooks for automated checks
- Commitlint - Conventional commit message enforcement
- Vitest - Unit and integration testing
- Playwright - End-to-end testing
- Storybook - Component development and testing
- Chromatic - Visual regression testing
- Sentry - Error monitoring and performance tracking
- PostHog - Product analytics and user insights
- Better Stack - Application monitoring
- GitHub Actions - Automated testing and deployment
- Checkly - Synthetic monitoring
- Codecov - Code coverage reporting
- Semantic Release - Automated versioning and releases
- Next-Intl - Type-safe internationalization
- Crowdin - Translation management
βββ .github/ # GitHub Actions workflows and templates
β βββ actions/setup-project/ # Reusable action for CI/CD
β βββ workflows/ # CI/CD pipeline definitions
βββ migrations/ # Database migration files
βββ public/ # Static assets
β βββ assets/ # Images and media files
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ [locale]/ # Internationalized routes
β β βββ api/ # API route handlers
β β βββ global-error.tsx # Global error boundary
β β βββ robots.ts # SEO robots configuration
β β βββ sitemap.ts # Dynamic sitemap generation
β βββ components/ # React components (organized by purpose)
β β βββ analytics/ # Analytics tracking components
β β βββ common/ # Reusable common components
β β βββ layout/ # Layout-specific components
β β βββ sections/ # Page sections (broken down into sub-components)
β β β βββ ContactSection/ # Contact form, info, map, stats
β β β βββ HeroSection/ # Hero content and background
β β β βββ ProjectsSection/ # Project carousel, cards, modal
β β βββ ui/ # ShadCN/UI components
β βββ libs/ # Core library configurations
β βββ locales/ # Translation files
β βββ models/ # Database schema definitions
β βββ styles/ # Global CSS and Tailwind configuration
β βββ templates/ # Page templates with Storybook stories
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions (organized by category)
β β βββ config/ # Application configuration
β β βββ database/ # Database utilities
β β βββ helpers/ # General helper functions
β βββ validations/ # Zod schema validations
βββ tests/ # Test files
β βββ e2e/ # End-to-end tests
β βββ integration/ # Integration tests
βββ Configuration Files # Various config files (see below)
- Node.js 20+ (specified in
package.jsonengines) - Bun (recommended package manager)
- PostgreSQL (for production) or PGLite (for local development)
-
Clone the repository
git clone https://github.com/saraansh/baranwal-associates.git cd baranwal-associates -
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env.local # Fill in your environment variables -
Set up the database
bun run db:migrate
-
Start the development server
bun run dev
The application will be available at http://localhost:3000.
bun run dev- Start development server with databasebun run dev:next- Start Next.js development server onlybun run dev:spotlight- Start Spotlight debugging tool
bun run build- Build production applicationbun run start- Start production serverbun run build-stats- Build with bundle analysis
bun run db:generate- Generate database migrationsbun run db:migrate- Run database migrationsbun run db:studio- Open Drizzle Studiobun run db-server:file- Start local file-based databasebun run db-server:memory- Start in-memory database
bun run lint- Run ESLintbun run lint:fix- Fix ESLint issues automaticallybun run check:types- TypeScript type checkingbun run check:deps- Check dependencies with Knipbun run check:i18n- Validate translationsbun run test- Run unit testsbun run test:e2e- Run end-to-end tests
bun run storybook- Start Storybook development serverbun run storybook:test- Run Storybook testsbun run build-storybook- Build Storybookbun run clean- Clean build artifactsbun run commit- Interactive commit with Commitizen
next.config.ts- Next.js configuration with pluginstsconfig.json- TypeScript compiler configurationpostcss.config.mjs- PostCSS configuration with Tailwind CSSdrizzle.config.ts- Database ORM configuration
eslint.config.mjs- ESLint configuration with comprehensive rulesvitest.config.mts- Test configuration for unit/UI testsplaywright.config.ts- End-to-end test configurationlefthook.yml- Git hooks for pre-commit validationcommitlint.config.ts- Commit message format enforcement
components.json- ShadCN/UI component configuration.storybook/- Storybook configuration
knip.config.ts- Dependency analysis configurationcheckly.config.ts- Synthetic monitoring configurationcodecov.yml- Code coverage configuration
crowdin.yml- Translation management configuration
The project uses a modular component architecture where large components are broken down into smaller, focused sub-components:
- Sections are directories: Each major section (ContactSection, ProjectsSection, etc.) has its own directory
- Index files for clean imports: Each directory exports its main component via
index.tsx - Single responsibility: Each component has a clear, single purpose
- Type safety: Shared types are defined once and reused
- Development: PGLite for fast, file-based local development
- Production: PostgreSQL with connection pooling
- Migrations: Drizzle Kit for type-safe schema management
- ORM: Drizzle ORM for type-safe database operations
- Unit Tests: Vitest with browser testing for component logic
- Integration Tests: API and database integration testing
- E2E Tests: Playwright for full user journey testing
- Visual Testing: Storybook + Chromatic for component appearance
- Synthetic Monitoring: Checkly for production monitoring
- Type-safe translations: Next-Intl with TypeScript integration
- Dynamic routing: Locale-based URL structure
- Translation management: Crowdin for collaborative translation
- Fallback strategy: English as default with graceful fallbacks
The project includes a comprehensive GitHub Actions pipeline:
- Matrix builds across Node.js versions (22.x, 24.x)
- Caching strategies for dependencies and Next.js builds
- Environment isolation with disabled monitoring in CI
- Commit message validation with Commitlint
- Code linting with ESLint and auto-fixing
- Type checking with TypeScript strict mode
- Dependency analysis with Knip
- Translation validation with i18n-check
- Unit tests with coverage reporting to Codecov
- Component tests with Storybook
- E2E tests with Playwright in Docker
- Visual regression tests with Chromatic
- Automated Crowdin sync on pull requests
- Translation updates committed back to PR
- Rate limiting with Arcjet
- DDoS protection and bot detection
- CORS configuration for API security
- Clerk integration with multi-locale support
- Secure session management
- Protected routes and middleware
- Type-safe environment variables with Zod validation
- Secrets management via environment variables
- Production/development environment isolation
- Sentry integration for error monitoring
- Source map uploads for better debugging
- Performance monitoring and alerting
- PostHog integration for product analytics
- Privacy-conscious tracking
- Custom event tracking
- Better Stack for infrastructure monitoring
- Checkly for synthetic monitoring
- Custom health checks and alerting
The application is configured for deployment on Vercel with:
- Automatic deployments from main branch
- Preview deployments for pull requests
- Environment variable management
- Performance monitoring and analytics
# Authentication
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
# Database
DATABASE_URL=
# Analytics (Optional)
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
# Monitoring (Optional)
NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN=
NEXT_PUBLIC_BETTER_STACK_INGESTING_HOST=
# Security (Optional)
ARCJET_KEY=
# Application
NEXT_PUBLIC_APP_URL=- Create a feature branch from
main - Make your changes following the established patterns
- Run quality checks:
bun run lint:fix bun run check:types bun run test - Commit using conventional commits:
bun run commit
- Create a pull request with descriptive title and body
- TypeScript: Strict mode with comprehensive type safety
- ESLint: Comprehensive linting with auto-fix
- Prettier: Consistent code formatting
- Conventional Commits: Structured commit messages
- Component patterns: Follow established architectural patterns
The project includes automated pre-commit hooks via Lefthook:
- Linting with auto-fix and staging
- Type checking for TypeScript files
- Commit message validation
This project is licensed under the MIT License - see the LICENSE file for details.
Saraansh Baranwal GitHub: @saraansh
Built with β€οΈ using Next.js, TypeScript, and modern web technologies.