Sawaka is an open-source platform designed to connect local artisans with their communities.
It is built on a modern, scalable architecture using Next.js, Node.js/Express, and MongoDB, with a focus on simplicity, performance, and extensibility.
- 🧑🎨 Artisan management (profiles, photos, categories)
- 🛒 Product and service management
- 👤 Authentication system (JWT)
- 🖼️ Image uploads (Cloudinary)
- 📦 REST API powered by Node.js and Express
- 🌐 Recommended deployment: Vercel (frontend) + Render (backend)
The project vision is documented in the GitHub Wiki:
👉 https://github.com/Bond52/sawaka/wiki/Vision-Document
This vision serves as a reference for:
- Epics definition
- Backlog prioritization
- Functional and technical decisions
git clone https://github.com/Bond52/sawaka.git
cd sawakaFrontend (root):
npm installBackend:
cd backend-api
npm install
cd ..Create backend-api/.env:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret
CLOUDINARY_CLOUD_NAME=...
CLOUDINARY_API_KEY=...
CLOUDINARY_API_SECRET=...Create .env.local in the project root (for the Next.js app):
NEXT_PUBLIC_API_URL=https://sawaka-api-prod.onrender.comFor local development, use http://localhost:5000 if the API runs locally.
Do not commit .env or .env.local.
Terminal 1 — API:
cd backend-api && npm run devTerminal 2 — Frontend:
npm run dev- Frontend: http://localhost:3000
- API: http://localhost:5000
See backend-api/README.md for API-specific scripts and layout.
Requires a running MongoDB instance (local or cloud). Set MONGO_URI in backend-api/.env.
cd backend-api
npm testnpm run lint
npm run buildBuild the app, then run Playwright:
npm run build
npm run start &
npx wait-on -t 60000 http://localhost:3000/
npx playwright testStart the API first, then run the collection:
cd backend-api && node index.js &
npx wait-on -t 30000 http://localhost:5000/
npx newman run tests/api/postman/sawaka.postman_collection.json \
-e tests/api/postman/sawaka.postman_environment.jsonGitHub Actions is the executable Definition of Done (DoD). The Sawaka CI workflow runs on every push and pull request to main and qa. A pull request is considered Done only when all required checks pass.
All of the following must succeed:
| Check | Description |
|---|---|
| Tests | Jest (backend), Newman (API), Playwright (frontend E2E) |
| Lint | npm run lint (Next.js ESLint) |
| Build | npm run build (Next.js) |
| Documentation | npm run docs:generate (JSDoc in backend-api) |
Branch protection rules enforce these quality gates: the configured branches (e.g. main, qa) require that CI succeeds before a PR can be merged. No merge without passing checks.
A task or PR is Done when:
- Acceptance criteria are met
- Code is on the correct branch (
main/qa/feature/*/fix/*) - All required CI checks pass (tests, lint, build, documentation generation)
- No regressions on desktop or mobile
- Documentation is updated when relevant
Workflow: .github/workflows/ci.yml. See docs/CI_DIAGNOSIS.md for CI design and troubleshooting.
The backend uses JSDoc for code-level documentation (routes, models, middleware).
Generate:
cd backend-api
npm run docs:generateOutput: backend-api/docs/jsdoc/. Open backend-api/docs/jsdoc/index.html in a browser.
JSDoc is also generated in CI. The backend-api/docs directory is gitignored.
The project vision is documented in the GitHub Wiki: Vision Document. It serves as a reference for epics, backlog prioritization, and functional decisions.
Architecture and flow diagrams (e.g. draw.io) can be stored in docs/diagrams when added.
We welcome contributions. Please read:
- CONTRIBUTING.md — How to contribute, branch strategy, quality standards
- CODE_OF_CONDUCT.md — Community guidelines
Onboarding path:
- Fork the repo, clone, install dependencies, set up env (see Quick Start).
- Create a branch:
feature/my-featureorfix/my-fix. - Make changes, run tests and lint locally.
- Open a pull request against
mainorqa. Ensure CI passes. - Follow review feedback and update as needed.
Additional guidelines (Definition of Ready, coding standards, PR workflow) are in the Wiki.
| Branch | Purpose |
|---|---|
main |
Production-ready code |
qa |
Integration and testing |
feature/* |
New features |
fix/* |
Bug fixes |
hotfix/* |
Urgent production fixes |
Additional guidelines are available in the Wiki:
- Definition of Ready
- Coding standards
- Workflow (issues, pull requests, reviews)
- License: See LICENSE
- Security: SECURITY.md