GithubHelp home page GithubHelp logo

cellajs / cella Goto Github PK

View Code? Open in Web Editor NEW
93.0 0.0 7.0 5.71 MB

TypeScript template to build local-first SaaS with hono + pg + drizzle + react + shadcn.

Home Page: https://cellajs.com

License: MIT License

Dockerfile 0.70% TypeScript 95.46% HTML 0.21% CSS 3.63%
drizzle hono monorepo openapi postgres turborepo vite zod zustand react

cella's Introduction


cellajs.com · ❗prerelease version · MIT license

Contents

  • Architecture for stack details and conceptual decisions
  • Roadmap to read where we are and what is planned
  • Installation for local development is explained below
  • Deployment explains how you can easily deploy your cella project

Installation

Step 1

Clone project & open directory

git clone [email protected]:cellajs/cella.git && cd cella

Env variables

In the env folder, you add a .env file using the .env.example. The minimum is the DATABASE_URL variable.

Step 2

There are three ways to run Cella:

A: Directly on local machine (Recommended for active devs)

Prerequisites

  • Node: Check your Node version with node -v. Install Node 20.x using Volta.
  • pnpm: Check your pnpm version with pnpm -v. Install pnpm 8.x using Volta.
  • Postgres: Install PostgreSQL 16.x on your machine, for example using Postgres.app if you are on a Mac.

Install dependencies

pnpm install

Populate database

If starting from scratch, you will need to run a database migration.

pnpm run migrate

Check it out at http://localhost:3000:

pnpm run dev
B: From inside a VS devcontainer (Not yet stable)

Prerequisites

Run devcontainer

  • Open VSCode and click one of these buttons to run the container: Screenshot
  • Alternatively, open the project in VSCode and use ⌘+⇧+p to run the Remote-Containers: Reopen in Container command.

Start command in container terminal:

pnpm run dev

Problems?

  • Rebuilding the docker container: Just open Orbstack and delete the container and volume that has cella in the name.
  • CORS issues: Make sure to open http://localhost:3000/ and not http://127.0.0.1:3000/
C: As basic docker container (Recommended for quick start)

Prerequisites

Run docker

pnpm run docker

Step 3

You need the users seed script to add an ADMIN user. Look into the seed for details. There is also an optional organizations seed to add organizations and users with faker.js. If you run in a container, access the (backend) container to run these scripts.

pnpm run seed:users
pnpm run seed:organizations

Use Drizzle Studio to manage your local db on https://local.drizzle.studio.

pnpm run studio

API documentation

Cella has autogenerated API docs. These can be viewed on locally at https:/localhost:4000/docs.

More info

  • EADDRINUSE errors? Try sudo lsof -i :1080 -i :3000 -i :4000 and then kill -9 *PID* with a space-separated list of PID.
  • Got pnpm cache issues? Try pnpm store prune.
  • Got turbo cache issues? Try adding --force to the command.
  • Got docker cache issues? Try docker builder prune --force.


💙💛 made possible using many amazing open source projects. Special thanks to Drizzle, HonoJS, Tanstack Router & Shadcn.

cella's People

Contributors

flipvh avatar gino1991 avatar romannabukhotnyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

scalarerp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.