A modern, Docker-ready Strapi v5 boilerplate with PostgreSQL, optimized for scalable content management.
- Strapi v5 with TypeScript
- Docker containerization
- PostgreSQL database integration
- RESTful API & GraphQL support
- Role-based access control (RBAC)
- Media library with multiple providers
- API documentation (OpenAPI/Swagger)
- Automated testing setup
- CI/CD pipeline configurations
-
Code Quality & Formatting
- ESLint configuration for consistent code style
- Prettier setup for automatic code formatting
- EditorConfig for cross-editor consistency
-
Git Hooks & Conventional Commits
- Husky for pre-commit and pre-push hooks
- Commitlint for conventional commit messages
- Lint-staged for running linters on staged files
-
CI/CD Pipeline
- GitHub Actions workflow for:
- Automated testing
- Code quality checks
- Build verification
- Docker image publishing
- Automated deployments
- GitHub Actions workflow for:
- Docker Desktop
- Node.js (>=18.x)
- npm (>=9.x) or yarn (>=1.22.x)
- Clone and setup:
git clone <repository-url>
cd my-strapi-project
cp .env.example .env
- Start with Docker:
make compose-dev
Access points:
- Admin Panel: http://localhost:1337/admin
- API Endpoint: http://localhost:1337/api
.
├── config/ # Strapi configurations
├── database/ # Database migrations & seeds
├── src/
│ ├── admin/ # Admin customizations
│ ├── api/ # Content-types & routes
│ ├── extensions/ # Strapi extensions
│ └── plugins/ # Custom plugins
├── public/ # Static files
├── tests/ # Test suites
├── types/ # TypeScript definitions
├── docker-compose.yml # Docker compose config
└── Dockerfile # Container definition
Key variables in your .env
:
HOST=0.0.0.0
PORT=1337
APP_KEYS="your-keys-here"
API_TOKEN_SALT="your-salt"
ADMIN_JWT_SECRET="your-secret"
JWT_SECRET="your-jwt-secret"
# Database
DATABASE_CLIENT=postgres
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_NAME=strapi
DATABASE_USERNAME=strapi
DATABASE_PASSWORD=strapi
Start development server:
npm run develop
# or with yarn
yarn develop
Run tests:
npm run test
# or with yarn
yarn test
- Build for production:
npm run build
# or
yarn build
- Start production server:
npm run start
# or
yarn start
- JWT authentication
- API token strategy
- Rate limiting
- CORS configuration
- Security headers
- SQL injection prevention
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details.