Step into Moonlitgrace, where a passionate web developer and open-source contributor shares insights, projects, and creativity—all under the alias Moonlitgrace.
git clone https://github.com/moonlitgrace/moonlitgrace.space moonlitgrace.spacecd moonlitgrace.spacenpm i
From repo you will get 3 .env files such as:
.env.example.env.development.env.local.example
Check Environment Variable Load Order for more information regarding this structure.
For SECRET_KEY you can use anything since it is for development. (You can use this openssl rand -base64 32 to create for production.)
As for ADMIN_USERNAME and ADMIN_PASSWORD add something to authenticate only you.
DATABASE_URL: uncomment value according to your selected workflow (see next heading).
Before running app, we need a postgres db running.
You can either run db on your system or use docker/podman.
eg postgresql connection string format: postgresql://[db_user[:db_password]@][db_host][:db_port]/[db_name]
If you've docker/podman installed, you can run db on a container with command:
# docker compose -f docker-compose.db.yml up
podman compose -f docker-compose.db.yml upNow db is up!
Next run database migrations with commands:
# can use any package manager
npm run db:generate
npm run db:migrateIf you want some mock data for development: run: npm run db:seed
To get next.js app running, run this command:
npm run devAnd that's for now! check localhost:3000 to see app running!
(un)fortunately this app is containerized, so you can easily run it with docker/podman/any(idk).
Just run this command:
# docker compose -f docker-compose.dev.yml up --build
podman compose -f docker-compose.dev.yml up --buildThis will run app on localhost:3000, hurray?
Next.js on container is not fun imho.
recommended: local setup