DayTrack Max is a compact birthday reminder application with a React frontend and a CodeIgniter 4 backend. Users can manage birthdays and individual email reminders, while the backend handles authentication, email verification, password recovery, and scheduled notifications.
frontend/: React, Tailwind, and the MJML sourcesbackend/: CodeIgniter 4 API and generated email views
- Import
backend/database.sqlin phpMyAdmin. - Copy
backend/.env.exampletobackend/.envand set the database connection, sender address, frontend URL, and cron key. - Set
VITE_APP_BASE_URLandVITE_API_BASE_URLinfrontend/.env.
Run these commands from frontend/:
npm run dev: start the local frontendnpm run build: build the frontend and copy it tobackend/publicnpm run preview: preview the production build locallynpm run lint: run ESLintnpm run typecheck: check TypeScriptnpm run emails:build: compile MJML tobackend/app/Views/emailsnpm run emails:watch: rebuild email views when their MJML sources change
For deployment, set the public URLs in frontend/.env:
VITE_APP_BASE_URL=https://example.com/DayTrackMax
VITE_API_BASE_URL=https://example.com/DayTrackMax/apiBuilds are saved to frontend/dist and copied to backend/public. Build email templates separately with npm run emails:build. Add new page routes to both frontend/src/routes.ts and the allowlist in backend/.htaccess.
Run composer install in backend/. Schedule a daily POST /api/cron/birthday-reminders with the header X-Cron-Key: <daytrack.cronKey>.
Set daytrack.demoAccountEnabled = true, daytrack.demoAccountEmail, and daytrack.demoAccountPassword in backend/.env to enable the demo account. The daily endpoint creates it in English with sample birthdays and resets it on each run.
Keep the credentials in frontend/src/demo-account.ts in sync with the backend configuration and rebuild the frontend after changes.
After building, upload backend/ to htdocs/DayTrackMax to serve the app at /DayTrackMax/. Alternatively, use backend/public as the web root.