Skip to content

artotor/BaaS

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

ACME Backend as a Service (BaaS)

A platform that allows users to create and manage projects with their own PostgreSQL databases and automatically generated GraphQL APIs.

Monorepo Structure

This project is organized as a monorepo with the following packages:

  • packages/admin-backend: NestJS backend that manages users, projects, and generates GraphQL APIs using PostGraphile
  • packages/admin-frontend: React frontend for the admin interface

Features

  • User authentication with JWT
  • Project creation and management
  • Automatic database provisioning for each project
  • Auto-generated GraphQL API for each project using PostGraphile
  • API Explorer with GraphQL Playground

Prerequisites

  • Node.js (v16+)
  • PostgreSQL (v14+)
  • Redis
  • pnpm (for package management)

Getting Started

  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Configure environment variables:

Copy the example environment file and adjust as needed:

cp packages/admin-backend/.env.example packages/admin-backend/.env
  1. Start the development servers:
# Run both backend and frontend
pnpm dev

# Run only backend
pnpm dev:backend

# Run only frontend
pnpm dev:frontend

The backend will be available at http://localhost:6868 and the frontend at http://localhost:3002.

Building for Production

pnpm build

This will build both the backend and frontend packages.

Project Structure

Backend (packages/admin-backend)

  • src/ - NestJS application source code
    • auth/ - Authentication and authorization modules
    • entities/ - TypeORM entity definitions
    • middlewares/ - Middleware including GraphQL generator
    • projects/ - Project management module
    • redis/ - Redis service for caching
    • plugins/ - PostGraphile plugins

Frontend (packages/admin-frontend)

  • src/ - React application source code
    • components/ - Reusable React components
    • pages/ - Main application pages
    • services/ - API service clients
    • hooks/ - Custom React hooks
    • store/ - State management

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published