A modern, responsive literary blog built with React, TypeScript, and Material-UI. Features a clear frontend/backend separation with Strapi CMS for content management.
- Node.js 18+
- npm (built-in with Node.js)
- PostgreSQL (for Strapi CMS) or SQLite (for development)
- MongoDB (for newsletter subscriptions - optional)
-
Clone the repository
git clone <repository-url> cd 61_Mokua
-
Install dependencies (run in each app directory)
cd frontend && npm install && cd .. cd backend/api-server && npm install && cd ../.. cd backend/strapi && npm install && cd ../..
-
Set up environment variables
Frontend (
frontend/.env):VITE_API_URL=http://localhost:3001 VITE_STRAPI_URL=http://localhost:1337 VITE_SHOW_COMING_SOON=false VITE_ENABLE_NEWSLETTER_SIGNUP=true
API Server (
backend/api-server/.env):PORT=3001 MONGODB_URI=mongodb://localhost:27017/mokua
Strapi (
backend/strapi/.env):HOST=0.0.0.0 PORT=1337 DATABASE_CLIENT=sqlite DATABASE_FILENAME=.tmp/data.db
-
Initialize Strapi CMS (first time only)
cd backend/strapi npx create-strapi-app@latest . --quickstart --no-run
-
Start development servers (run each in its own terminal)
cd frontend && npm run dev # Frontend on :5173 cd backend/api-server && npm run dev # API Server on :3001 cd backend/strapi && npm run develop # Strapi CMS on :1337
This project follows a monorepo structure with clear separation:
- Single Repository: All code in one place for easy maintenance
- Feature-Based Organization: Each feature has its own folder
- Shared Infrastructure: Common components, utilities, and API endpoints
- Feature Flags: Environment-based feature toggling
61_Mokua/
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # UI components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ types/ # TypeScript types
β βββ public/ # Static assets
β βββ package.json
β
βββ backend/
β βββ api-server/ # Express API (newsletter, etc.)
β β βββ src/
β β βββ package.json
β β
β βββ strapi/ # Strapi CMS
β βββ config/
β βββ src/
β βββ package.json
β
βββ docs/ # Documentation
See PROJECT_STRUCTURE.md for detailed structure documentation.
The application uses feature flags to control functionality:
true: Shows the coming soon page (landing page with newsletter signup)false: Shows the full blog application with routing
true: Newsletter signup functionality is availablefalse: Newsletter signup is disabled
true: Search functionality is availablefalse: Search is disabled
true: Content submission functionality is availablefalse: Submissions are disabled
VITE_SHOW_COMING_SOON=false
VITE_ENABLE_NEWSLETTER_SIGNUP=true
VITE_ENABLE_SEARCH=true
VITE_ENABLE_SUBMISSIONS=trueVITE_SHOW_COMING_SOON=true
VITE_ENABLE_NEWSLETTER_SIGNUP=true
VITE_ENABLE_SEARCH=false
VITE_ENABLE_SUBMISSIONS=falseVITE_SHOW_COMING_SOON=false
VITE_ENABLE_NEWSLETTER_SIGNUP=true
VITE_ENABLE_SEARCH=true
VITE_ENABLE_SUBMISSIONS=trueRun from each directory:
Frontend (frontend/):
npm run dev- Start dev servernpm run build- Build for production
API Server (backend/api-server/):
npm run dev- Start API server
Strapi (backend/strapi/):
npm run develop- Start Strapi CMS
- Create feature components in
src/components/ - Add feature flags in
src/utils/featureFlags.ts - Update routing in
src/App.tsxif needed - Document changes in
docs/
- Newsletter signup with MongoDB integration
- Responsive design with custom fonts
- Content management via JSON files
- Rate limiting and error handling
- Full-featured literary blog
- Article management and categorization
- Author profiles and pages
- Search functionality
- Contact and submission forms
- Dark/light theme toggle
- Frontend: React 18, TypeScript, Vite
- UI Framework: Material-UI (MUI)
- State Management: Zustand
- Styling: Tailwind CSS + MUI
- Backend API: Express.js, Mongoose
- CMS: Strapi v4 (Headless CMS)
- Database: MongoDB (API), PostgreSQL/SQLite (Strapi)
- Deployment: Vercel (Frontend), Railway/Render (Backend)
- Project Structure - Overview of frontend/backend structure
- Strapi Setup Guide - CMS configuration and setup
- Migration Guide - Moving to new structure
- Frontend/Backend Setup - Setup instructions
- Feature Flags Configuration
- Architecture Decisions
- Deployment Guide
- Email Subscription System
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.