Installation
Step-by-step installation guide for the portfolio ecosystem
Installation Guide
This guide covers the installation process for all three components of the mdanamulhasan ecosystem: Frontend, Backend API, and CMS Dashboard.
Prerequisites
Ensure you have the following installed on your machine:
- Node.js: v18.0.0 or higher (v20+ recommended)
- pnpm: v8.0.0 or higher (recommended package manager)
- Git: For version control
- Wrangler: For Cloudflare Workers development (
pnpm add -g wrangler)
1. Backend API (mdanamulhasan-api)
The backend should be set up first as other components depend on it.
Clone & Install
# Clone the repository
git clone https://github.com/mdanamulhasan/mdanamulhasan-api.git
cd mdanamulhasan-api
# Install dependencies
pnpm install
Database Setup
The API uses Cloudflare D1 (SQLite). You need to create a local database for development.
# Create D1 database
pnpm wrangler d1 create mdanamulhasan-db
# Apply migrations locally
pnpm wrangler d1 migrations apply mdanamulhasan-db --local
Environment Variables
The API requires several environment variables for proper operation. Create a .dev.vars file in the API project root:
# JWT Secret for authentication
JWT_SECRET=your-super-secret-jwt-key
# Email service configuration
RESEND_API_KEY=your-resend-api-key
[email protected]
[email protected]
# Mailchimp integration
MAILCHIMP_API_KEY=your-mailchimp-api-key
MAILCHIMP_SERVER_PREFIX=us1
MAILCHIMP_AUDIENCE_ID=your-audience-id
# CORS configuration
FRONTEND_URL=http://localhost:3000
DASHBOARD_URL=http://localhost:3001
Start Development Server
pnpm dev
The API will be available at http://localhost:8787.
2. CMS Dashboard (mdanamulhasan-cms)
The CMS is used to manage content for the portfolio.
Clone & Install
# Clone the repository
git clone https://github.com/mdanamulhasan/mdanamulhasan-cms.git
cd mdanamulhasan-cms
# Install dependencies
pnpm install
Environment Setup
Create a .env file in the root directory:
cp .env.example .env
Edit .env to point to your local API:
NUXT_PUBLIC_API_BASE=http://localhost:8787/api
Start Development Server
pnpm dev
The CMS will be available at http://localhost:3001.
3. Frontend (mdanamulhasan)
The main portfolio website.
Clone & Install
# Clone the repository
git clone https://github.com/mdanamulhasan/mdanamulhasan.git
cd mdanamulhasan
# Install dependencies
pnpm install
Environment Setup
Create a .env file in the root directory:
cp .env.example .env
Edit .env to point to your local API:
NUXT_PUBLIC_SITE_URL=http://localhost:3000
NUXT_PUBLIC_API_BASE_URL=http://localhost:8787/api
Start Development Server
pnpm dev
The frontend will be available at http://localhost:3000.
Verification
To verify everything is working correctly:
- Visit
http://localhost:8787/api/health- Should return status ok. - Visit
http://localhost:3001- Should show the CMS login page. - Visit
http://localhost:3000- Should show the portfolio homepage.