Exodus90 Application
February 7, 2025 ยท View on GitHub
This is a Next.js project using Payload CMS for content management. Ok, Open http://localhost:3000 with your browser to see the result.
Payload CMS Collections
The application uses several collections to manage content:
Exercises
- Main exercise collection
- Fields:
- name (text, required)
- description (rich text)
- slug (text, required, unique)
Versions
- Versions of exercises
- Fields:
- name (text, required, unique)
- exercise (relationship to exercises)
- description (textarea)
- isActive (checkbox)
Days
- Daily content
- Fields:
- relationType (select: 'week' or 'exercise')
- week (relationship to weeks)
- exercise (relationship to exercises)
- number (number, required)
- title (text)
- content (rich text, required)
Weeks
- Weekly content structure
- Fields:
- version (relationship to versions)
- number (number, required)
- title (text)
- tasks (array of tasks with title, description, and due date)
Starting Dates
- Manages exercise start dates
- Fields:
- exercise (relationship to exercises)
- version (relationship to versions)
- startDate (date, required)
- endDate (date)
- isActive (checkbox)
Media
- Media asset management
- Fields:
- alt (text, required)
- upload capabilities enabled
Users
- User management
- Authentication enabled
- Fields:
- email (default)
- Additional auth-related fields
Getting Started
npm install
docker compose -f docker-compose-db.yml up -d // run postgres docker container
npx prisma db push // push current schema to database
npx payload migrate
npm run dev
Open http://localhost:3000 with your browser to see the result.
Basic Payload flow
- Open admin section http://localhost:3000/admin and create new account.
- Create
Exercise - Create
Version - Create
Week - Create
Day
Development Workflow
We follow a structured Git branching strategy integrated with standard-version for release management and Coolify for deployments.
Branch Structure
master- Production branch, reflects the live production statedevelop- Development branch, integration branch for featuresfeature/*- Feature branchesbugfix/*- Bug fix branchesrelease/*- Release preparation brancheshotfix/*- Urgent production fix branches
Daily Development Flow
-
Create a new feature branch from develop:
git checkout develop git checkout -b feature/your-feature-name -
Make changes using conventional commits:
git commit -m "feat: add new feature" git commit -m "fix: resolve edge case" git commit -m "docs: update documentation"Commit types:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Adding/updating testsperf:- Performance improvementschore:- Maintenance tasks
-
Push your feature and create a PR to develop:
git push origin feature/your-feature-name
Release Process
-
Create a release branch:
git checkout develop git checkout -b release/next-version -
Run the release script:
npm run releaseThis will:
- Bump version in package.json
- Update CHANGELOG.md
- Create a git tag
-
Merge to main and develop:
# Merge to main git checkout main git merge release/next-version git push origin main git push --tags # Merge back to develop git checkout develop git merge release/next-version git push origin develop
Hotfix Process
For urgent production fixes:
-
Create hotfix branch:
git checkout main git checkout -b hotfix/critical-fix -
Make your fix:
git commit -m "fix: resolve critical issue" -
Run patch release:
npm run release -- --release-as patch -
Merge to main and develop:
# Merge to main git checkout main git merge hotfix/critical-fix git push origin main git push --tags # Merge to develop git checkout develop git merge hotfix/critical-fix git push origin develop
Release Commands
Available npm scripts for releases:
npm run release # Standard release
npm run release:major # Major version bump
npm run release:minor # Minor version bump
npm run release:patch # Patch version bump
Deployment
We use Coolify for deployments:
- DEV environment: Automatically deploys from
developbranch - PROD environment: Automatically deploys from
masterbranch
Development
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Run production server
npm run start
# Run tests
npm run test
# Format code
npm run format
# Lint code
npm run lint
License
Private - All Rights Reserved