Template Architecture
A production-ready, full-stack Next.js 16 CMS and portfolio application with admin dashboard, MongoDB backend, JWT authentication, and Cloudinary media management.
Overview
Template Architecture is a comprehensive full-stack web application built with Next.js 16 (App Router), React 19, TypeScript, and MongoDB. It provides a complete admin CMS dashboard for managing content and a public-facing portfolio website for showcasing work.
The application follows modern web development best practices with server components, server actions, API routes organized by feature, role-based access control, and a fully type-safe codebase.
Features
Admin Dashboard
Full CMS with CRUD operations for projects, services, teams, testimonials, collaborations, and more.
Portfolio Website
Responsive public site with hero, about, services, portfolio, testimonials, and contact sections.
JWT Authentication
Secure admin login with 30-day token expiry, bcrypt password hashing, and role-based access control.
Cloudinary Integration
Image and video upload, optimization, and CDN delivery. Configurable from the admin panel.
Dynamic Content
Configurable home page sections, page banners, SEO metadata, business hours, and terms/policy.
Drag & Drop
Sortable lists for teams, testimonials, and services using @dnd-kit for intuitive reordering.
Rich Text Editor
SunEditor integration for creating HTML content in settings, terms, and policy pages.
Data Tables
TanStack React Table with pagination, sorting, search, and status toggle capabilities.
Docker Ready
Production Dockerfile included for containerized deployments with Node 20 and pnpm.
Tech Stack
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 (Strict Mode) |
| UI Library | React 19 |
| Styling | Tailwind CSS v4, Radix UI, ShadCN/UI |
| Database | MongoDB with Mongoose ODM |
| Authentication | NextAuth v5 (Beta) + JSON Web Tokens |
| File Storage | Cloudinary |
| Form Handling | React Hook Form + Zod v4 |
| State Management | Zustand |
| Data Tables | TanStack React Table |
| Drag & Drop | @dnd-kit |
| Rich Text Editor | SunEditor |
| Icons | Lucide React, React Icons |
| Date Handling | date-fns, Moment.js |
| Caching | Node Cache (30-day TTL) |
| Package Manager | pnpm |
| Deployment | Docker (Node 20) |
Prerequisites
- Node.js v20 or higher
- pnpm (recommended) or npm
- MongoDB — A MongoDB Atlas cluster or local instance
- Cloudinary Account — For image and video uploads
Installation
1. Clone the Repository
git clone <repository-url>
cd template-architecture2. Install Dependencies
pnpm install3. Configure Environment Variables
Create a .env file in the project root (see Environment Variables section for details).
4. Run the Development Server
pnpm devThe application will be available at http://localhost:3000.
5. Build for Production
pnpm build
pnpm startEnvironment Variables
Create a .env file in the project root with the following variables:
AUTH_TRUST_HOST="true"
NEXTAUTH_SECRET="your-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
MONGODB_URI="mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<database>?retryWrites=true&w=majority"| Variable | Required | Description |
|---|---|---|
AUTH_TRUST_HOST | Yes | Set to "true" for NextAuth in production |
NEXTAUTH_SECRET | Yes | Secret key for JWT signing and session encryption |
NEXTAUTH_URL | Yes | Full URL of your application |
NEXT_PUBLIC_BASE_URL | Yes | Public base URL used in client-side API calls |
MONGODB_URI | Yes | MongoDB connection string |
openssl rand -base64 32Default Admin Credentials
On first run, the application automatically seeds a default admin account:
| Field | Value |
|---|---|
admin@example.com | |
| Password | ChangeMe123! |
| Login URL | /admin/login |
Project Structure
template-architecture/
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth layout group
│ │ └── admin/login/ # Admin login page
│ ├── (private)/ # Protected admin routes
│ │ └── admin/dashboard/ # Dashboard & sub-routes
│ │ ├── (showcase)/ # About Us, Our Work, Story
│ │ ├── banner/ # Banner management
│ │ ├── collaborations/ # Collaborations CRUD
│ │ ├── contact-list/ # Contact submissions
│ │ ├── projects/ # Project CRUD (create, edit)
│ │ ├── services/ # Service types management
│ │ ├── settings/ # App settings
│ │ ├── subscribe/ # Newsletter subscribers
│ │ ├── teams/ # Team management
│ │ ├── testimonials/ # Testimonials management
│ │ └── _components/ # Dashboard UI components
│ ├── (public)/ # Public-facing pages
│ │ ├── about/ # About page
│ │ ├── contact/ # Contact form
│ │ ├── portfolio/ # Portfolio grid
│ │ ├── project/[id]/ # Project detail
│ │ ├── policy/ # Privacy policy
│ │ └── terms/ # Terms & conditions
│ ├── api/
│ │ ├── admin/ # Protected API routes
│ │ │ ├── auth/ # Login, me, password
│ │ │ ├── banner/ # Banner CRUD
│ │ │ ├── collaborations/ # Collaborations CRUD
│ │ │ ├── contact-us/ # Contact management
│ │ │ ├── dashboard/stats/ # Dashboard statistics
│ │ │ ├── file/ # File upload/delete
│ │ │ ├── home-section/ # Home section CRUD
│ │ │ ├── project/ # Project CRUD
│ │ │ ├── service-type/ # Service type CRUD
│ │ │ ├── settings/ # Settings management
│ │ │ ├── subscribe/ # Subscription management
│ │ │ ├── team/ # Team CRUD
│ │ │ ├── testimonial/ # Testimonial CRUD
│ │ │ └── about-section/ # About section CRUD
│ │ ├── auth/[...nextauth]/ # NextAuth configuration
│ │ └── public/ # Public API routes
│ └── layout.tsx # Root layout
├── actions/ # Server Actions
│ ├── about/ # About section actions
│ ├── admin/ # Admin auth actions
│ ├── banner/ # Banner actions
│ ├── collaborations/ # Collaboration actions
│ ├── contact-list/ # Contact list actions
│ ├── dashboard/ # Dashboard statistics
│ ├── fileUpload/ # File upload actions
│ ├── profile/ # Profile actions
│ ├── projects/ # Project actions
│ ├── services/ # Service actions
│ ├── settings/ # Settings actions
│ ├── showcase/ # Showcase actions
│ ├── subscribe/ # Subscribe actions
│ ├── teams/ # Team actions
│ └── testimonial/ # Testimonial actions
├── components/ # React Components
│ ├── custom/ # Reusable UI components
│ │ ├── data-table/ # DataTable with pagination
│ │ ├── CustomImage.tsx # Cloudinary image wrapper
│ │ ├── DateTimePicker.tsx # Date picker component
│ │ ├── RichTextEditor.tsx # SunEditor wrapper
│ │ ├── img-dropzone-single.tsx # Drag-drop image upload
│ │ ├── PhoneInputField.tsx # Phone input component
│ │ └── ToasterComponents.tsx # Toast notifications
│ └── features/landing/ # Landing page components
├── model/ # Mongoose Schemas
│ ├── User.ts # Admin user model
│ ├── Project.ts # Project model
│ ├── Team.ts # Team member model
│ ├── ServiceType.ts # Service type model
│ ├── Testimonial.ts # Testimonial model
│ ├── Banner.ts # Banner model
│ ├── ContactUs.ts # Contact submission model
│ ├── Subscribe.ts # Email subscription model
│ ├── HomeSection.ts # Home section model
│ ├── AboutSection.ts # About section model
│ ├── Settings.ts # Global settings model
│ └── collaborations.ts # Collaborations model
├── lib/ # Utilities & Helpers
│ ├── async-handler.ts # API route error handler
│ ├── async-formdata-handler.ts # FormData handler
│ ├── authenticate.ts # JWT auth middleware
│ ├── api-client.ts # Server-side API client
│ ├── server-utils.ts # Cloudinary, JWT, validation
│ ├── validation-schema.ts # Zod validation schemas
│ ├── mongo-adapter.ts # MongoDB aggregation helper
│ ├── fileUpload.ts # File upload utilities
│ ├── file-validator.ts # File type/size validation
│ ├── compressImages.ts # Image compression
│ ├── metadata.ts # SEO metadata helpers
│ ├── helper-funcs.ts # General utilities
│ ├── utils.ts # Client-side utilities
│ └── types.ts # TypeScript definitions
├── config/ # Configuration
│ ├── database.ts # MongoDB connection & seeding
│ ├── cloudinary.ts # Cloudinary SDK setup
│ ├── routes.ts # Route constants
│ ├── constant.ts # App constants & enums
│ └── cache.ts # Node Cache setup
├── hooks/ # React Custom Hooks
├── public/ # Static Assets
├── Dockerfile # Docker deployment
├── next.config.ts # Next.js configuration
├── tsconfig.json # TypeScript configuration
├── components.json # ShadCN/UI configuration
└── .env # Environment variablesApp Routing
The application uses Next.js App Router with route groups to organize pages by access level:
| Route Group | Purpose | Layout |
|---|---|---|
(auth) | Authentication pages (admin login) | Minimal layout |
(private) | Protected admin dashboard pages | Dashboard layout with sidebar navigation |
(public) | Public-facing website pages | Public layout with header and footer |
Public Routes
| Route | Description |
|---|---|
/ | Home / Landing page |
/about | About page |
/portfolio | Portfolio showcase |
/project/:slug | Project detail page |
/contact | Contact form |
/terms | Terms & conditions |
/policy | Privacy policy |
Admin Routes
| Route | Description |
|---|---|
/admin/login | Admin login page |
/admin/dashboard | Dashboard home with statistics |
/admin/dashboard/projects | Project management |
/admin/dashboard/services | Service type management |
/admin/dashboard/teams | Team member management |
/admin/dashboard/testimonials | Testimonial management |
/admin/dashboard/collaborations | Collaborations management |
/admin/dashboard/banner | Banner management |
/admin/dashboard/contact-list | Contact form submissions |
/admin/dashboard/subscribe | Newsletter subscribers |
/admin/dashboard/settings | Application settings |
/admin/dashboard/about-us | About us content editor |
/admin/dashboard/our-work | Our work content editor |
/admin/dashboard/story | Story content editor |
Authentication
Authentication Flow
- Admin submits email and password at
/admin/login. - Server validates credentials against the database using bcrypt.
- A JWT token is generated (signed with
NEXTAUTH_SECRET, 30-day expiry). - Token is stored in the NextAuth session.
- All subsequent admin API requests include the token as
Authorization: Bearer <token>. - The
authenticate()middleware verifies the JWT on every protected endpoint.
JWT Configuration
| Property | Value |
|---|---|
| Algorithm | HS256 |
| Token Expiry | 30 days |
| Payload | { email, role } |
| Password Hashing | bcrypt (10 salt rounds) |
Role-Based Access Control
The system supports two roles: admin and user. All admin dashboard and API routes require the admin role. The role is embedded in the JWT payload and verified on each request.
Database Models
All models are defined using Mongoose ODM and stored in the model/ directory. Timestamps (createdAt, updatedAt) are automatically added to all models.
User
| Field | Type | Description |
|---|---|---|
name | String | Admin name (required) |
email | String | Unique email address (required, indexed) |
password | String | Bcrypt hashed password |
role | Enum | admin or user |
Project
| Field | Type | Description |
|---|---|---|
title | String | Project title |
slug | String | URL-friendly slug |
shortDescription | String | Brief summary |
description | String | Full HTML description |
type | ObjectId | Reference to ServiceType |
thumbnail | String | Cloudinary image path |
image | String | Cloudinary image path |
isFeatured | Boolean | Show in featured section |
active | Boolean | Published status |
feature | Array | { title, description } |
gallery | Array | { title, image } |
Team
| Field | Type | Description |
|---|---|---|
name | String | Member name (required) |
designation | String | Job title (required) |
image | String | Cloudinary image path |
details | String | Bio or description |
position | Number | Sort order (default: 0) |
status | Boolean | Active status (default: true) |
ServiceType
| Field | Type | Description |
|---|---|---|
title | String | Service name |
description | String | Service description |
status | Boolean | Active status |
position | Number | Sort order |
Testimonial
| Field | Type | Description |
|---|---|---|
image | String | Author photo |
quote | String | Testimonial text |
authorName | String | Author name |
authorRole | String | Author designation |
order | Number | Sort order |
status | Boolean | Active status |
Banner
| Field | Type | Description |
|---|---|---|
title | String | Banner title (required) |
subTitle | String | Subtitle text |
description | String | Banner description |
images | Array | Cloudinary image paths |
isPaired | Boolean | Paired display mode |
ContactUs
| Field | Type | Description |
|---|---|---|
name | String | Sender name (required) |
email | String | Sender email (required) |
phone | String | Phone number |
message | String | Message content |
status | Boolean | Read status |
HomeSection
| Field | Type | Description |
|---|---|---|
sectionKey | String | Unique section identifier |
title | String | Section title |
subTitle | String | Subtitle |
features | Array | { title, description } |
stats | Array | { value, suffix, label } |
content | Mixed | Flexible JSON data |
sectionType | String | Content type identifier |
AboutSection
| Field | Type | Description |
|---|---|---|
title | String | Section title |
philosophyDescription | String | Philosophy content (required) |
philosophyImage | String | Philosophy image (required) |
missionDescription | String | Mission content (required, max 1000) |
missionImage | String | Mission image (required) |
visionDescription | String | Vision content (required) |
visionImage | String | Vision image (required) |
Settings
| Field | Type | Description |
|---|---|---|
general | Object | Company name, phone, email, address, logo, favicon, social links |
businessHours | Array | 7-day schedule with open/close times |
pageBanner | Object | Images for various pages |
cloudinary | Object | Cloud name, API key, API secret, folder name |
metadata | Object | SEO title, description, keywords, OG image |
termsPolicy | Object | Terms and privacy policy HTML content |
Collaborations
| Field | Type | Description |
|---|---|---|
name | String | Partner name (required) |
image | String | Partner logo |
status | Boolean | Active status |
Middleware & Utilities
asyncHandler
Wraps API route handlers with automatic database connection, JWT authentication (when enabled), Zod request validation, and standardized error handling.
// With validation and auth
export const POST = asyncHandler(createProjectSchema, async (req, data, params) => {
// data is validated and typed
return apiResponse(true, 201, 'Created', result);
}, true); // true = require authentication
// Without validation, with auth
export const GET = asyncHandler(async (req, params) => {
return apiResponse(true, 200, 'Success', data);
}, true);authenticate
JWT verification middleware that extracts the Bearer token from the Authorization header, verifies its signature, and returns the decoded user data.
validation-schema
Centralized Zod validation schemas for all API inputs including admin login, projects, teams, testimonials, settings, and more. Each schema enforces type safety and business rules.
mongo-adapter
Provides a reusable aggregateWithPagination() method for MongoDB aggregation queries with built-in pagination, sorting, matching, and lookup support.
api-client
Server-side fetch wrapper that automatically includes the JWT token from the NextAuth session, handles errors, and supports both JSON and FormData requests.
Server Utilities
uploadImage()— Upload files to CloudinarycleanupCloudinaryAssets()— Delete uploaded files on errortransformCloudinaryPaths()— Convert stored paths to full URLsapiResponse()— Standardized API response builder- Custom Zod field helpers:
requiredStringField(),optionalStringField(),requiredObjectIdField(), etc.
Server Actions
Server actions in the actions/ directory provide server-side functions for handling mutations from the admin dashboard. They use the api-client utility to make authenticated requests to the API routes.
| Directory | Purpose |
|---|---|
actions/admin/ | Admin authentication (login) |
actions/projects/ | Project CRUD operations |
actions/services/ | Service type management |
actions/teams/ | Team member management |
actions/testimonial/ | Testimonial management |
actions/collaborations/ | Collaboration management |
actions/banner/ | Banner management |
actions/contact-list/ | Contact submission management |
actions/subscribe/ | Newsletter subscription management |
actions/settings/ | Settings management |
actions/about/ | About section management |
actions/showcase/ | Showcase content management |
actions/fileUpload/ | File upload operations |
actions/profile/ | Admin profile management |
actions/dashboard/ | Dashboard statistics |
API Overview
All API routes are located in app/api/ and follow RESTful conventions. The API is divided into two main groups:
- Admin API (
/api/admin/*) — Protected endpoints that require a valid JWT token - Public API (
/api/public/*) — Open endpoints for the public website
Response Format
{
"status": true,
"message": "Success message",
"data": { },
"pagination": {
"totalDocs": 100,
"page": 1,
"limit": 10,
"pages": 10,
"hasNext": true,
"hasPrev": false
}
}Query Parameters (Paginated Endpoints)
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 10 | Items per page |
search | string | — | Search keyword (case-insensitive) |
sortBy | string | createdAt | Field to sort by |
sortOrder | string | desc | Sort direction (asc/desc) |
Authentication Header
Authorization: Bearer <jwt-token>Authentication API
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/admin/auth/login | Login with email and password |
| GET | /api/admin/auth/me | Get current admin profile |
| POST | /api/admin/auth/password | Change password |
POST /api/admin/auth/login
// Request Body
{
"email": "admin@example.com",
"password": "ChangeMe123!"
}
// Response
{
"status": true,
"message": "Login successful",
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": { "name": "Admin", "email": "admin@example.com", "role": "admin" }
}
}Projects API
Admin Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/project | List projects (paginated, searchable) |
| POST | /api/admin/project | Create a new project |
| GET | /api/admin/project/:id | Get project by ID |
| PUT | /api/admin/project/:id | Update project |
| DELETE | /api/admin/project/:id | Delete project |
Public Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/public/project | List active projects (paginated, filterable) |
| GET | /api/public/project/:slug | Get project by slug |
| GET | /api/public/project/feature | Get featured projects |
Service Types API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/service-type | List service types |
| POST | /api/admin/service-type | Create service type |
| PUT | /api/admin/service-type/:id | Update service type |
| DELETE | /api/admin/service-type/:id | Delete service type |
| POST | /api/admin/service-type/sort | Reorder services |
Public: GET /api/public/service-type — List active services
Teams API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/team | List team members |
| POST | /api/admin/team | Create team member |
| PUT | /api/admin/team/:id | Update team member |
| DELETE | /api/admin/team/:id | Delete team member |
| POST | /api/admin/team/sort | Reorder team members |
| PATCH | /api/admin/team/status/:id | Toggle team member status |
Public: GET /api/public/team — List active team members
Testimonials API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/testimonial | List testimonials |
| POST | /api/admin/testimonial | Create testimonial |
| PUT | /api/admin/testimonial/:id | Update testimonial |
| DELETE | /api/admin/testimonial/:id | Delete testimonial |
| POST | /api/admin/testimonial/sort | Reorder testimonials |
| PATCH | /api/admin/testimonial/status/:id | Toggle status |
Public: GET /api/public/testimonial — List active testimonials
Collaborations API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/collaborations | List collaborations |
| POST | /api/admin/collaborations | Create collaboration |
| PUT | /api/admin/collaborations/:id | Update collaboration |
| DELETE | /api/admin/collaborations/:id | Delete collaboration |
| PATCH | /api/admin/collaborations/status/:id | Toggle status |
Public: GET /api/public/collaborations — List active collaborations
Contact API
Admin Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/contact-us | List contact submissions (paginated) |
| PUT | /api/admin/contact-us/:id | Update submission status |
| DELETE | /api/admin/contact-us/:id | Delete submission |
Public Endpoint
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/public/contact-us | Submit contact form |
Home Sections API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/home-section | List home sections |
| POST | /api/admin/home-section | Create home section |
| PUT | /api/admin/home-section | Update home section |
| GET | /api/admin/home-section/name/:slug | Get section by slug |
| PUT | /api/admin/home-section/name/:slug | Update section by slug |
| DELETE | /api/admin/home-section/name/:slug | Delete section by slug |
Public: GET /api/public/home-section and GET /api/public/home-section/:slug
About Section API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/about-section | Get about section |
| POST | /api/admin/about-section | Create or update about section |
Public: GET /api/public/about-section — Get about section content
Settings API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/settings | Get all settings |
| POST | /api/admin/settings/general | Update general settings |
| POST | /api/admin/settings/cloudinary | Update Cloudinary config |
| POST | /api/admin/settings/metadata | Update SEO metadata |
| POST | /api/admin/settings/business-hour | Update business hours |
| POST | /api/admin/settings/page-banner | Update page banners |
| POST | /api/admin/settings/terms | Update terms & policy |
Public: GET /api/public/settings — Get public settings
File Upload API
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/admin/file | Upload image(s) to Cloudinary |
| DELETE | /api/admin/file | Delete image(s) from Cloudinary |
File uploads use multipart/form-data. Supported formats include JPEG, PNG, WebP, SVG, and video files. Maximum upload size is 50MB (configurable in next.config.ts).
Dashboard API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/dashboard/stats | Get dashboard statistics |
Returns counts and summaries of all content types for the admin dashboard overview.
Newsletter API
Admin Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/subscribe | List subscribers (paginated) |
| DELETE | /api/admin/subscribe/:id | Delete subscriber |
Public Endpoint
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/public/subscribe | Subscribe to newsletter |
Public Endpoints Summary
All public endpoints are accessible without authentication.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/public/project | List active projects |
| GET | /api/public/project/:slug | Get project by slug |
| GET | /api/public/project/feature | Get featured projects |
| GET | /api/public/service-type | List active services |
| GET | /api/public/team | List active team members |
| GET | /api/public/testimonial | List active testimonials |
| GET | /api/public/collaborations | List active collaborations |
| GET | /api/public/banner | Get banner content |
| GET | /api/public/home-section | List home sections |
| GET | /api/public/home-section/:slug | Get section by slug |
| GET | /api/public/about-section | Get about section |
| GET | /api/public/settings | Get public settings |
| POST | /api/public/contact-us | Submit contact form |
| POST | /api/public/subscribe | Subscribe to newsletter |
Cloudinary Setup
- Create a free account at cloudinary.com.
- From your Cloudinary dashboard, note your Cloud Name, API Key, and API Secret.
- Log into the admin panel and go to Settings → Cloudinary.
- Enter your Cloudinary credentials and set a Folder Name to organize uploads.
Settings Management
The admin dashboard provides a comprehensive settings panel with the following tabs:
| Tab | Description |
|---|---|
| General | Company name, phone, email, address, logo, favicon, social media links, home view configuration |
| Cloudinary | Cloud name, API key, API secret, folder name, secure URL base |
| Metadata | SEO title, application name, description, keywords, Open Graph image |
| Business Hours | 7-day weekly schedule with open/close times and closure support |
| Page Banners | Banner images for various pages |
| Terms & Policy | Terms of service and privacy policy HTML content (Rich Text Editor) |
SEO & Metadata
The application generates dynamic metadata for each page using the settings configured in the admin panel. The lib/metadata.ts helper generates page-specific metadata with:
- Dynamic page titles
- Meta descriptions
- Keywords
- Open Graph images
- Application name
Configure these values from Admin Dashboard → Settings → Metadata.
Docker Deployment
# Build the image
docker build -t template-architecture .
# Run the container
docker run -p 3000:3000 --env-file .env template-architectureThe Dockerfile uses Node 20 with pnpm, installs dependencies, builds the Next.js application, and exposes port 3000.
Dockerfile Overview
FROM node:20
WORKDIR /app
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
EXPOSE 3000
RUN pnpm build
CMD ["pnpm", "start"]Scripts
| Command | Description |
|---|---|
pnpm dev | Start development server on port 3000 |
pnpm build | Build for production |
pnpm start | Start production server |
pnpm lint | Run ESLint |
pnpm docs | Start documentation server |
pnpm dev:all | Run dev server and docs concurrently |
Template Architecture v0.1.0 — Built with Next.js 16, React 19, TypeScript & MongoDB