Getting Started
Installation

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 dhdflow

Install Dependencies

Using pnpm (recommended):

pnpm install

Or with npm:

npm install

Set Up Environment Variables

Create a .env file in the root directory:

cp .env.example .env

Edit the .env file with your configuration. See Environment Variables for details.

Start MongoDB

If running MongoDB locally:

mongod

Or use MongoDB Atlas and update your MONGODB_URI in .env.

Run Development Server

pnpm dev

Open 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 assets

Build for Production

pnpm build
pnpm start

Troubleshooting

MongoDB Connection Issues

Ensure your MONGODB_URI is correct and MongoDB is running:

# Check MongoDB status (macOS)
brew services list | grep mongodb

Port Already in Use

If port 3000 is busy, use a different port:

pnpm dev -- -p 3001