@wizeworks/create-wize-api
v1.13.2
Published
A CLI to scaffold Fastify + Sentry+ MongoDb + GraphQL API projects for WizeWorks.
Maintainers
Readme
WizeWorks GraphQL API 🚀
✨ Overview
The WizeWorks GraphQL API is a multi-tenant, MongoDB-backed API built with Express, GraphQL Yoga, and modern tooling for observability and traceability via Sentry.
This API is designed to serve as a backend foundation for WizeWorks SaaS apps.
🔧 Tech Stack
| Tool | Purpose | |-----------------------|-------------------------------------------| | Express | Lightweight Node.js web framework | | GraphQL Yoga | GraphQL server with subscriptions | | MongoDB | NoSQL database for multi-tenant data | | Sentry | Error monitoring + transaction tracing | | GraphQL Scalars | Extended GraphQL support (DateTime, etc.)| | dotenv | Secure environment variable loading |
🚀 Features
- ⚡ Fast and lightweight GraphQL API
- 🔐 Multi-tenant aware via dynamic
tenantIdinjection - 📦 MongoDB integration with dynamic schema support
- 🧠 Rich GraphQL subscriptions using PubSub
- 📊 Full observability with scoped Sentry logging
- 🛡️ Fine-grained auth using API keys and scopes
- 🧪 Easy local development with
.envand mock data
🏁 Getting Started
1. Scaffold a New Project
npx @wizeworks/create-wize-apiThis will prompt you for:
- Project name
- Display name
- And automatically install dependencies
2. Environment Setup
Create a .env file based on .env.example:
MONGO_URI=mongodb://localhost:27017
SENTRY_DSN=https://[email protected]/0
PORT=30003. Run the Dev Server
npm run devAccess GraphQL Playground at:
👉 http://localhost:3000/graphql
📡 Example GraphQL Query
query {
listExamples {
id
title
createdAt
}
}🚀 Deployment
1. Local Development
Run Node:
npm run dev2. Kubernetes Deployment
This repo includes production-ready Kubernetes manifests in the deployment/ folder.
kubectl apply -f deployment/deployment.yaml
kubectl apply -f deployment/service.yaml
kubectl apply -f deployment/ingress.yaml3. GitHub Actions (CI/CD)
GitHub Actions will auto-deploy on push to main.
You’ll need to configure the following secrets in your GitHub repository:
| Secret Name | Description |
|---------------------|---------------------------------------------|
| AKS_CLUSTER | AKS Cluster Name |
| ACR_NAME | Container registry URL |
| IMAGE_NAME | Image name (e.g., wize-example) |
| MONGO_URI | MongoDB connection string |
| SENTRY_DSN | Sentry DSN |
You can customize these in .github/workflows/deploy.yml.
🔁 Commit Versioning Requirement
Semantic Release will automatically:
- Analyze commits
- Bump the version
- Publish to npm under the
@wizeworksscope
✍️ License
MIT © WizeWorks
💡 Future Plans
- ⚙️ CLI for creating tenants & migrations
- 📘 Swagger/OpenAPI generation for REST proxying
- 🧩 Federation-ready module splitting
- 🔁 Live MongoDB → PubSub bridge
🙏 Contributing
We welcome contributions! Check out CONTRIBUTING.md to get started.
