Full-stack web application template featuring Next.js frontend, Strapi CMS admin/backend, and PostgreSQL database.
This template provides a clean, scalable structure for building modern web projects with a headless CMS and optional custom backend logic.
-
Frontend (Next.js)
- Public-facing website with SSR/SSG support
- Tailwind CSS for styling
- API integration with Strapi and custom backend
-
Backend (Custom Node.js)
- Optional business logic
- REST API endpoints
- PostgreSQL models and database integration
- Authentication and authorization support
-
Admin (Strapi)
- Content management dashboard
- Role-based access control
- Custom content-types (products, blogs, pages, etc.)
-
Database (PostgreSQL)
- Relational database for Strapi CMS content
- Can also store custom backend data
next-strapi-postgres-template/
├── frontend/ # Next.js frontend
├── backend/ # Custom Node.js backend
├── strapi/ # Strapi CMS / admin portal
├── package.json # Optional root package.json for monorepo
└── README.md
- Node.js (v18+)
- npm or yarn
- PostgreSQL database
- (Optional) Docker for local development
- Navigate to the
strapifolder:
cd strapi- Install dependencies:
npm install- Configure PostgreSQL in
.envorconfig/database.js:
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_NAME=mydb
DATABASE_USERNAME=myuser
DATABASE_PASSWORD=mypassword- Start Strapi:
npm run developAdmin panel available at: http://localhost:1337/admin
- Navigate to the
backendfolder:
cd backend- Install dependencies:
npm install- Configure PostgreSQL connection in
.env:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=mydb
DB_USER=myuser
DB_PASSWORD=mypassword- Start backend:
npm run dev- Navigate to the
frontendfolder:
cd frontend- Install dependencies:
npm install- Configure API endpoints in
.env:
NEXT_PUBLIC_STRAPI_URL=http://localhost:1337
NEXT_PUBLIC_BACKEND_URL=http://localhost:5000- Start frontend:
npm run devFrontend available at: http://localhost:3000
- Frontend: Vercel / Netlify
- Strapi: Render / Railway / self-hosted server with PostgreSQL
- Backend: Render / Railway / AWS / DigitalOcean
This template is designed to be reusable for any project. Feel free to:
- Add new content-types in Strapi
- Extend custom backend with new APIs
- Customize frontend components and pages
MIT License