Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tiesen243/next-safety-server-action

Next.js safety server action template
https://github.com/tiesen243/next-safety-server-action

lucia-auth next-safe-action nextjs prisma-orm server-actions template type-safety

Last synced: about 1 month ago
JSON representation

Next.js safety server action template

Awesome Lists containing this project

README

        

# Next Safety Server Action

This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-t3-app`](https://create.t3.gg/). It includes a simple example of how to use [next safe action](https://next-safe-action.dev) with [Lucia](https://lucia-auth.com) and [Prisma](https://prisma.io).

## Tech Stack

- [Next.js](https://nextjs.org)
- [Lucia](https://lucia-auth.com)
- [Prisma](https://prisma.io)
- [Next Safe Action](https://next-safe-action.dev)
- [Tailwind CSS](https://tailwindcss.com)

## Getting Started

First, clone the repository:

```bash
git clone [email protected]:tiesen243/next-safe-action.git
```

Then, install the dependencies:

```bash
bun install
```

Next, create a `.env` file in the root of the project and add the following environment variables:

> Note: You can get the `POSTGRES_PRISMA_URL` and `POSTGRES_URL_NON_POOLING` via [vercel](https://vercel.com/docs/storage)

```bash
cp .env.example .env
```

Then, run the development server:

```bash
bun db:push
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.