/remix-dashboard-template

A template to get you up and building a dashboard in Remix.

Primary LanguageTypeScript

remix-dashboard-template

A template to get you up and building a dashboard in Remix.

Getting started with the template

npx create-remix@latest --install --typescript --template jacob-ebey/remix-dashboard-template

You will have the option of:

  • No DB using a mock service
  • Prisma with SQLite
  • Prisma with PostgreSQL

Development

docker-compose

If you have chosen to use PostgreSQL, a docker-compose.yml will have been created in the root of your project. You can start the database by running:

docker-compose up -d

You will have to run a migration against the DB if it's the first time running the project. See the below section on Migrations.

npx prisma migrate dev

Migrations

You can apply migrations to your development database by running:

npx prisma migrate dev

Running the app

Start the Remix development asset server and the Express server by running:

npm run dev

This starts your app in development mode, which will purge the server require cache when Remix rebuilds assets so you don't need a process manager restarting the express server.

Deployment

First, build your app for production:

npm run build

Then run the app in production mode:

npm start

Now you'll need to pick a host to deploy it to.

If you're familiar with deploying express applications you should be right at home just make sure to deploy the output of remix build

  • build/
  • public/build/

Resources