-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37b2e6d
commit bdafc8b
Showing
1,171 changed files
with
73,454 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
vite.config.ts.* | ||
node_modules | ||
dist | ||
dev-dist | ||
out | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.idea | ||
.DS_Store | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
.turbo | ||
.env | ||
.env.* | ||
!.env.example | ||
!.env.local | ||
|
||
# Cache | ||
*.tsbuildinfo | ||
.sentryclirc | ||
.million | ||
.db | ||
|
||
# Other | ||
.netlify | ||
.wrangler | ||
backend/files | ||
frontend/stats.html | ||
frontend/src/generated | ||
*.zip | ||
|
||
## Cella | ||
cella.diverged.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package-import-method=clone-or-copy | ||
public-hoist-pattern[]=pdfjs-dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<div align="center"> | ||
|
||
<img src="./info/screenshot-dark.png#gh-dark-mode-only" /> | ||
<img src="./info/screenshot.png#gh-light-mode-only" /> | ||
|
||
<br /> | ||
|
||
<!-- | ||
* _ _ | ||
* ░▒▓█████▓▒░ ___ ___| | | __ _ | ||
* ░▒▓█ █▓▒░ / __/ _ \ | |/ _` | | ||
* ░▒▓█ █▓▒░ | (_| __/ | | (_| | | ||
* ░▒▓█████▓▒░ \___\___|_|_|\__,_| | ||
* | ||
--> | ||
|
||
|
||
<p> | ||
<h1><b>Cella</b></h1> | ||
<p> | ||
<b>Single stack TypeScript template to build SaaS with sync & offline capabilities.</b> | ||
<br /> | ||
<br /> | ||
<a href="https://cellajs.com">Website</a> | ||
· | ||
Prerelease | ||
· | ||
MIT license | ||
</p> | ||
<br /> | ||
</p> | ||
|
||
</div> | ||
|
||
> [!CAUTION] | ||
> Please be aware this is a prerelease. It does NOT meet production requirements yet and large breaking changes still occur regularly. An alpha version will be released once we have solid tests for at least authentication & authorization. Want to contribute or discuss cella for one of your projects? Let's connect! ✉️ <info@cellajs.com> | ||
#### Contents | ||
- [Installation](#installation) | ||
- [Architecture](/info/ARCHITECTURE.md) | ||
- [Roadmap](/info/ROADMAP.md) | ||
- [Deployment](/info/DEPLOYMENT.md) | ||
|
||
## Requirements | ||
- Make sure you have node installed with `node -v`. Install Node 20.x or 22.x. (ie. [Volta](https://docs.volta.sh/guide/)). | ||
- Ideally you work with [git over ssh](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). | ||
|
||
<br> | ||
|
||
## Create your own app | ||
Want to use cella to build your next web app? We made it simple using a short create CLI: | ||
|
||
```bash | ||
pnpm create @cellajs/cella@latest | ||
``` | ||
|
||
Follow the steps in create CLI and then run your app: | ||
|
||
```bash | ||
pnpm quick | ||
``` | ||
|
||
You now have an implementation-ready web app. 🤯! But ... without any unique functionality 🤓. Read the [Quickstart](/info/QUICKSTART.md) so you can build something unique quickly. | ||
|
||
|
||
## Installation | ||
For those that want to participate in development: | ||
|
||
```bash | ||
git clone git@github.com:cellajs/cella.git && cd cella | ||
``` | ||
|
||
### A. Quick setup | ||
|
||
```bash | ||
pnpm install && pnpm quick | ||
``` | ||
|
||
### B. Full setup | ||
For a full setup - with Postgres instead of pglite - you need Docker. Install [Orbstack](https://orbstack.dev/) or [Docker](https://docs.docker.com/get-docker/). | ||
|
||
```bash | ||
pnpm install | ||
pnpm docker | ||
``` | ||
|
||
Start all servers: | ||
|
||
```bash | ||
pnpm dev | ||
``` | ||
|
||
Lastly, [seed](/backend/scripts/README.md) your db (with `dev` running) to sign in as [admin user](/backend/scripts/README.md). | ||
|
||
```bash | ||
pnpm seed | ||
``` | ||
|
||
Check it out at [localhost:3003](http://localhost:3003)! Generated API docs can be found at [localhost:4004/docs](http://localhost:4004/docs). Manage your local db with [local.drizzle.studio](http:local.drizzle.studio). | ||
|
||
|
||
<br /> | ||
<br /> | ||
|
||
💙💛 Big thank you to [drizzle](https://github.com/drizzle-team/drizzle-orm), [hono](https://github.com/honojs/hono), [tanstack-router](https://github.com/tanstack/router) & [electric](https://github.com/electric-sql/electric). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
If you have a security issue to report, please contact us at [security@cellajs.com](mailto:security@cellajs.com). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# DON'T EVER EXPOSE - NOT EVEN TEMPORARILY - PRODUCTION KEYS OR SECRETS IN .ENV FILE. | ||
# FOR PRODUCTION, SET ENVIRONMENT VARIABLES MANUALLY IN THE HOSTING SERVICE. | ||
|
||
# Node environment (required) | ||
NODE_ENV=development | ||
|
||
# Enable a WASM Postgres running on nodejs (required) | ||
PGLITE=false | ||
|
||
# Database (required) | ||
DATABASE_URL=postgres://postgres:postgres@0.0.0.0:5432/postgres | ||
|
||
# Secret for email unsubscribe token (required) | ||
UNSUBSCRIBE_TOKEN_SECRET=some_secret_token | ||
|
||
# Secret for argon2id password (required) | ||
ARGON_SECRET=argon_two_secret | ||
|
||
# Remote system access IP (required) (for multiple IPs, separate by comma) | ||
REMOTE_SYSTEM_ACCESS_IP=* | ||
|
||
# Sendgrid (optional) | ||
SENDGRID_API_KEY= | ||
SEND_ALL_TO_EMAIL= | ||
|
||
# For Novu integration (optional) | ||
NOVU_API_KEY= | ||
NOVU_SUB_ID= | ||
NOVU_SLACK_WEBHOOK= | ||
|
||
# Backend port (optional) | ||
PORT=4004 | ||
|
||
# Logtail/Better Stack (optional) | ||
LOGTAIL_TOKEN= | ||
|
||
# OAuth strategies (optional) | ||
GITHUB_CLIENT_ID= | ||
GITHUB_CLIENT_SECRET= | ||
GOOGLE_CLIENT_ID= | ||
GOOGLE_CLIENT_SECRET= | ||
MICROSOFT_TENANT_ID= | ||
MICROSOFT_CLIENT_ID= | ||
MICROSOFT_CLIENT_SECRET= | ||
|
||
# TUS secret (optional) | ||
TUS_UPLOAD_API_SECRET= | ||
|
||
# Imado AWS credentials (all optional): | ||
# 1. AWS S3 upload | ||
AWS_S3_UPLOAD_ACCESS_KEY_ID= | ||
AWS_S3_UPLOAD_SECRET_ACCESS_KEY= | ||
|
||
# 2. AWS Cloudfront CDN | ||
AWS_CLOUDFRONT_KEY_ID= | ||
AWS_CLOUDFRONT_PRIVATE_KEY= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineConfig } from 'drizzle-kit'; | ||
import { dbConfig } from '#/db/db'; | ||
import { env } from './env'; | ||
|
||
const extendConfig = env.PGLITE ? { driver: 'pglite' } : {}; | ||
|
||
export default defineConfig({ | ||
schema: './src/db/schema/*', | ||
out: './drizzle', | ||
dialect: 'postgresql', | ||
casing: dbConfig.casing, | ||
...extendConfig, | ||
dbCredentials: { | ||
url: env.PGLITE ? './.db' : env.DATABASE_URL, | ||
}, | ||
}); |
Oops, something went wrong.