Based on the amazing DBEST stack by itsyoboieltr.
The DBEST moon
stack is a bun-based 🔥 BLAZINGLY FAST
🔥 full-stack 100% type-safe
web development solution that provides everything
you need to build a production-ready
web app based on the performant and scalable SolidStart meta-framework. It consists of:
DBEST moon uses moonrepo as a monorepo management tool. Ensure moonrepo is installed.
Create a new project.
bun create elliotnash/dbest-moon
Optionally specify a name for the destination folder. If no destination is specified, the name dbest-moon
will be used.
bun create elliotnash/dbest-moon my-app
Bun will perform the following steps:
-
Download the
template
. -
Copy all template files into the
destination folder
. -
Install dependencies with
bun i
. -
Initialize a fresh Git repo. Opt out with the
--no-git
flag.
Moon uses postgresql as a database. The easist way to get started is using the included docker-compose which includes a preconfigured PostgreSQL instance.
Install Docker.
Copy .example.env
to .env
You can start the development server
with:
moon :docker-dev -- :dev
This will start the development docker container and bind mount the project root to /app
Bring up a production
docker container with:
moon :docker-deploy
Note
|
This will automatically build the app as the :start task depends on :build
|
Any time you update the database schema, a database migration will need to be performed.
To generate db migrations run:
moon :docker-<dev|prod> -- :generate-db
To apply these migrations run:
moon :docker-<dev|prod> -- :migrate-db
To inspect the database using Drizzle Studio run:
moon :docker-<dev|prod> -- :inspect-db