Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 20.x or higher recommended
pnpm
Fast, disk space efficient package manager
This project uses pnpm as the package manager. If you don’t have it installed, run:
Installation
Follow these steps to set up your development environment:Install dependencies
Install all required packages using pnpm:This will install all dependencies defined in
package.json, including:- Next.js 14 - React framework
- TypeScript 5 - Type safety
- React 18 - UI library
- @dnd-kit - Drag and drop functionality
- Socket.io-client - Real-time updates
- Axios - HTTP client
- SASS - Styling
- Biome - Linting and formatting
Running the Development Server
Start the Next.js development server:Development server features
Development server features
- Fast Refresh - Instant feedback on code changes
- Hot Module Replacement - Updates without full page reload
- Error overlay - Detailed error messages in the browser
- TypeScript checking - Real-time type validation
Building for Production
Create an optimized production build:- Compiles TypeScript to JavaScript
- Bundles and minifies all assets
- Optimizes images and fonts
- Generates static pages where possible
- Creates server-side rendering bundles
Always test your production build locally before deploying to ensure everything works as expected.
Linting and Code Quality
This project uses Biome for fast, comprehensive code linting and formatting.Running the Linter
Biome Configuration
The project uses a custom Biome configuration (biome.json) with:
Biome features enabled
Biome features enabled
- Auto-organize imports - Sorts imports alphabetically
- Sorted attributes - Consistent JSX attribute ordering
- Sorted properties - Alphabetical object keys
- Tab indentation - 4-space tabs for consistency
- Double quotes - Enforced quote style
- Smart semicolons - Added only when needed
TypeScript Configuration
The project uses strict TypeScript settings for maximum type safety:tsconfig.json
exactOptionalPropertyTypes is enabled, which means you cannot pass undefined explicitly to optional properties. This prevents common bugs and enforces cleaner type contracts.Path Aliases
The project uses the@/ alias for cleaner imports:
Troubleshooting
Port 3000 already in use
Port 3000 already in use
If port 3000 is occupied, Next.js will automatically try port 3001. You can also specify a custom port:
Module not found errors
Module not found errors
Clear the cache and reinstall dependencies:
TypeScript errors
TypeScript errors
Ensure you’re using TypeScript 5.x:
WebSocket connection failed
WebSocket connection failed
Verify that:
- The backend server is running
NEXT_PUBLIC_API_URLis correctly set- There are no CORS issues
Next Steps
Project Structure
Learn about the architecture and directory organization
Styling Guide
Understand the SCSS modules and theming system