Professional automotive panel beating and spray painting services in Zimbabwe. This Next.js application features a comprehensive admin portal for content management, customer testimonials, service bookings, and more.
This application uses Strapi as the exclusive admin dashboard for content management. The custom Next.js admin routes have been disabled.
-
Start the Strapi backend:
cd strapi-backend npm run develop -
Access the Strapi admin panel at:
http://localhost:1337/admin -
Log in with your Strapi admin credentials.
Strapi provides a comprehensive admin interface for managing all aspects of your application:
- Content Types: Manage services, bookings, blog posts, gallery items, testimonials, FAQs, etc.
- Media Library: Upload and manage images and other media files
- User Management: Create and manage user accounts and permissions
- API Configuration: Configure API endpoints and permissions
We've created a setup script to help with environment configuration:
npm run setup
This will:
- Create .env files from examples if they don't exist
- Provide instructions for next steps
To also install dependencies automatically, use:
npm run setup:install
-
Start the Strapi backend:
cd strapi-backend npm run develop -
Start the Next.js frontend:
npm run dev -
Access the application at:
- Frontend:
http://localhost:3000 - Strapi Admin:
http://localhost:1337/admin
- Frontend:
- A middleware has been implemented to redirect all
/admin/*routes to the Strapi admin panel. - The frontend connects to the Strapi backend API at
http://localhost:1337/api. - Authentication is handled through Strapi's authentication system.
A new version of Strapi (5.17.0) is available. To update:
We've created a helper script to simplify the update process:
cd strapi-backend
npm run update
This script will:
- Back up your current package.json
- Run the Strapi upgrade command
- Ensure all Strapi dependencies are updated to the same version
- Install the updated dependencies
For updating to a specific version:
cd strapi-backend
npm run update:version 5.17.0
This script will automatically update all Strapi dependencies to the specified version and run npm install.
-
Run the upgrade command:
cd strapi-backend npm run upgrade -
Or run a dry-run first to see what changes will be made:
cd strapi-backend npm run upgrade:dry -
After upgrading, update the version numbers in
package.json.
Additional documentation is available in the following files:
- CONTRIBUTING.md - Guidelines for contributing to the project
- DEPLOYMENT.md - Checklist for deploying to production
This project includes Docker configuration for containerized deployment:
- Docker and Docker Compose installed on your system
- Create a
.envfile in the project root with the required environment variables (see.env.example)
-
Set up the Docker environment:
npm run docker:setup
This script creates a
.envfile with secure random values for all required environment variables. -
Build and start the containers:
npm run docker:up
or manually with:
docker-compose up -d --build
-
Access the applications:
- Frontend: http://localhost:3000
- Strapi Admin: http://localhost:1337/admin
-
Stop the containers:
npm run docker:down
or manually with:
docker-compose down
docker-compose.yml- Defines the multi-container setupDockerfile.frontend- Builds the Next.js frontendstrapi-backend/Dockerfile- Builds the Strapi backend
This project includes GitHub Actions workflows for continuous integration and deployment:
The main CI/CD pipeline (.github/workflows/ci.yml) runs on pushes to main and develop branches and on pull requests:
- Lint and Test: Runs linting and tests for the codebase
- Build Frontend: Builds the Next.js frontend
- Build Strapi: Builds the Strapi backend
- Docker Build: Builds and pushes Docker images (only on push to
main)
A dedicated workflow for updating Strapi (.github/workflows/update-strapi.yml):
# Trigger manually from GitHub Actions UI with:
# - Version: 5.17.0 (or other version)
# - Create PR: true/falseAn automated workflow (.github/workflows/dependency-updates.yml) checks for dependency updates weekly and creates a pull request with the changes.
-
Environment Variables: Use
.envfiles for all environment-specific configurations. TypeScript declarations are available insrc/types/env.d.ts. -
Type Safety: Ensure all API responses and data models have proper TypeScript interfaces.
-
Error Handling: Implement consistent error handling throughout the application.
-
Testing: Add unit and integration tests for critical functionality.
-
Documentation: Keep documentation up-to-date with any changes to the API or content structure.
-
Monitoring: Consider adding logging and monitoring for production deployments.
-
Scripts: Use the provided helper scripts for common tasks:
npm run setup- Set up environment configurationnpm run setup:install- Set up environment and install dependenciescd strapi-backend && npm run update- Update Strapi to the latest version