Installation
This guide will help you set up Sunday locally for development.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 20.x or later
- pnpm (recommended) or npm
- MongoDB (local instance or MongoDB Atlas account)
Clone the Repository
git clone https://github.com/rahvis/dhdflow.git
cd dhdflowInstall Dependencies
Using pnpm (recommended):
pnpm installOr with npm:
npm installSet Up Environment Variables
Create a .env file in the root directory:
cp .env.example .envEdit the .env file with your configuration. See Environment Variables for details.
Start MongoDB
If running MongoDB locally:
mongodOr use MongoDB Atlas and update your MONGODB_URI in .env.
Run Development Server
pnpm devOpen http://localhost:3000 (opens in a new tab) in your browser.
Project Structure
dhdflow/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes
│ ├── boards/ # Board pages
│ ├── dashboard/ # Dashboard page
│ ├── signin/ # Authentication pages
│ └── ...
├── components/ # React components
│ ├── board/ # Board view components
│ ├── ui/ # Base UI components
│ └── ...
├── lib/ # Utility functions
│ ├── store.ts # Zustand state management
│ ├── types.ts # TypeScript types
│ ├── auth.ts # Authentication utilities
│ └── mongodb.ts # Database connection
└── public/ # Static assetsBuild for Production
pnpm build
pnpm startTroubleshooting
MongoDB Connection Issues
Ensure your MONGODB_URI is correct and MongoDB is running:
# Check MongoDB status (macOS)
brew services list | grep mongodbPort Already in Use
If port 3000 is busy, use a different port:
pnpm dev -- -p 3001