Development Setup Guide
Complete guide to setting up the Cascadia Marquee website development environment
Development Setup Guide
Complete guide to setting up the Cascadia Marquee website development environment.
Prerequisites
- Node.js 18+ - Download from nodejs.org
- pnpm (recommended) or npm/yarn - Install with
npm install -g pnpm - Git - For version control
Installation
1. Clone the Repository
2. Install Dependencies
3. Environment Variables
Create a .env.local file in the root directory:
Required environment variables:
4. Run Development Server
The site will be available at http://localhost:3000
Development Commands
Core Commands
Content and registry
Code Quality
Development Workflow
1. Content Development
- Blog Posts: Add
.mdxfiles tosrc/content/posts/ - Documentation: Add
.mdxfiles tosrc/content/docs/ - Services: Add
.mdxfiles tosrc/content/services/
2. Component Development
- UI Components: Use shadcn/ui or create custom components in
src/components/ui/ - Layout Components: Add to
src/components/layout/ - Feature Components: Add to appropriate subdirectories
3. Styling
- Tailwind CSS: Use utility classes for styling
- Custom CSS: Add to
src/app/globals.css - Component Styles: Use CSS modules or styled-components
Project Structure Deep Dive
App Router Structure
Component Architecture
Content Management
Configuration Files
Next.js Configuration (next.config.ts)
Tailwind Configuration (tailwind.config.ts)
Content Collections (content-collections.ts)
The root content-collections.ts file defines four collections (Zod schemas plus transforms):
- docs (
Doc,allDocs) - Documentation pages - posts (
Post,allPosts) - Blog posts - legalDocs (
LegalDoc,allLegalDocs) - Legal documents - services (
Service,allServices) - Service descriptions
MDX is compiled at build/dev time. Import collections in app code:
Generated types and data live in .content-collections/generated (gitignored). tsconfig.json maps content-collections to that folder.
Development Tools
ESLint Configuration
The project uses a custom ESLint configuration with:
- Import ordering - Automatic import sorting
- TypeScript rules - Type checking and best practices
- React rules - React-specific linting
- Prettier integration - Code formatting
TypeScript Configuration
- Strict mode enabled
- Path mapping for clean imports (
@/aliases) - Next.js types included
- Content Collections types generated automatically in
.content-collections/generated
Troubleshooting
Common Issues
"Module not found" errors:
- Run
pnpm installto ensure all dependencies are installed - Check that file paths are correct
- Verify TypeScript path mappings
Content not updating:
- Restart
pnpm devor runpnpm build(Content Collections runs with Next.js) - Check that MDX files have proper front matter
- Verify file naming conventions
Build errors:
- Run
pnpm type-checkto identify TypeScript errors - Check ESLint output with
pnpm lint - Verify environment variables are set
Styling issues:
- Ensure Tailwind classes are properly configured
- Check that CSS variables are defined
- Verify component imports
Performance Optimization
- Image optimization - Use
next/imagefor all images - Font optimization - Use
next/fontfor custom fonts - Code splitting - Leverage Next.js automatic code splitting
- Bundle analysis - Use
@next/bundle-analyzerfor optimization
Next Steps
- Set up your development environment following this guide
- Explore the content structure in
src/content/ - Check out the component library in
src/components/ui/ - Review the technical guides in the documentation section
- Start contributing to the project!
For questions or help, check the other documentation sections or contact the development team.