# Clone the repository
git clone [repository-url]
cd hellodeck
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local
# Initialize database
npx prisma generate
npx prisma migrate dev
# Start development server
pnpm dev
- Node.js 18+ installed
- pnpm or npm installed
- Git installed
- A GitHub account (for OAuth)
- A NEAR wallet (for Calimero integration)
Create a .env.local
file with these variables:
# Database
DATABASE_URL="file:./dev.db"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-here"
# GitHub OAuth
GITHUB_ID="your-github-oauth-app-id"
GITHUB_SECRET="your-github-oauth-app-secret"
# Encryption (32 bytes hex for key, 16 bytes for IV)
ENCRYPTION_KEY="32-bytes-encryption-key-here-32-by"
ENCRYPTION_IV="16-bytes-iv-here!"
# Calimero
NEXT_PUBLIC_CALIMERO_SHARD_ID="your-shard-id"
NEXT_PUBLIC_WALLET_ENDPOINT_URL="https://wallet.calimero.network"
NEXT_PUBLIC_CALIMERO_ENDPOINT_URL="https://api.calimero.network"
NEXT_PUBLIC_CALIMERO_TOKEN="your-token-here"
The project uses Prisma with SQLite by default:
# Generate Prisma client
npx prisma generate
# Create database and run migrations
npx prisma migrate dev
# (Optional) View database with Prisma Studio
npx prisma studio
# Development mode
pnpm dev
# Production build
pnpm build
pnpm start
-
"Database file not found":
npx prisma migrate reset
-
"Prisma Client not generated":
npx prisma generate
-
"NEXTAUTH_SECRET must be provided":
- Ensure
.env.local
has NEXTAUTH_SECRET set - Generate a random secret:
openssl rand -base64 32
- Ensure
-
"GitHub OAuth errors":
- Verify GitHub OAuth app settings
- Ensure callback URL matches your NEXTAUTH_URL
-
"Calimero SDK initialization failed":
- Check NEAR wallet connection
- Verify Calimero credentials in .env.local
- Ensure valid shard access
-
"Invalid token":
- Generate new Calimero token
- Check token expiration
-
"TypeScript errors":
# Clean install dependencies rm -rf node_modules rm -rf .next pnpm install
-
"Port already in use":
# Kill process using port 3000 lsof -i :3000 kill -9 <PID>
- Use
npx prisma studio
to inspect/modify database - Check
http://localhost:3000/api/auth/signin
for auth testing - Monitor
.next/server/pages/api
for API routes - Test messages in incognito for multi-user simulation