https://github.com/jacob-ebey/remix-dashboard-d1
https://github.com/jacob-ebey/remix-dashboard-d1
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacob-ebey/remix-dashboard-d1
- Owner: jacob-ebey
- Created: 2022-11-17T04:58:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-17T07:40:17.000Z (over 3 years ago)
- Last Synced: 2025-04-01T20:07:11.598Z (about 1 year ago)
- Language: TypeScript
- Size: 374 KB
- Stars: 85
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# remix-dashboard-template
A template to get you up and building a dashboard in Remix that runs solely on Cloudflare.
## Development
### Migrations
You can apply migrations to your development database by running:
```sh
npx prisma migrate dev
```
### Running the app
Start the Remix development asset server and Wrangler by running:
```sh
npm run dev
```
This starts your app in development mode.
## Deployment
### First deployment
Create a database:
```sh
wrangler d1 create remix-dashboard-d1-example-db
```
Apply migrations:
```sh
wrangler d1 migrations apply remix-dashboard-d1-example-db
```
Build and deploy:
```sh
npm run build && npx wrangler publish
```
## Subsequent deployments
Configure a GitHub Actions secrets of `CF_API_TOKEN` with the normal worker deployment permissions + the new D1 write permissions to be able to apply migrations on deployment.
To trigger a deployment:
- Navigate to the "Actions" tab of your GitHub repository
- Select the "Deploy" action
- Use the dropdown labeled "Run Workflow" to select a branch and start the deployment
## Resources
- [Remix Docs](https://remix.run/docs)
- [CF D1](https://developers.cloudflare.com/d1/)
- [Prisma Docs](https://www.prisma.io/docs/) (only used for generating migrations)