generated from Zac-Zajdel/PrismaNext
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from Zac-Zajdel/upgrade_package_version
- Loading branch information
Showing
226 changed files
with
15,997 additions
and
4,063 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# ----------------------------------------------------------------------------- | ||
# App | ||
# ----------------------------------------------------------------------------- | ||
NEXT_PUBLIC_APP_URL=http://localhost:3000 | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Authentication (NextAuth.js) | ||
# ----------------------------------------------------------------------------- | ||
NEXTAUTH_URL=http://localhost:3000 | ||
NEXTAUTH_SECRET= | ||
|
||
GOOGLE_CLIENT_ID= | ||
GOOGLE_CLIENT_SECRET= | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Database (MySQL - PlanetScale) | ||
# ----------------------------------------------------------------------------- | ||
DATABASE_URL="mysql://root:root@localhost:3306/taxonomy?schema=public" | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Email (Postmark) | ||
# ----------------------------------------------------------------------------- | ||
SMTP_FROM= | ||
POSTMARK_API_TOKEN= | ||
POSTMARK_SIGN_IN_TEMPLATE= | ||
POSTMARK_ACTIVATION_TEMPLATE= | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Subscriptions (Stripe) | ||
# ----------------------------------------------------------------------------- | ||
STRIPE_API_KEY= | ||
STRIPE_WEBHOOK_SECRET= | ||
STRIPE_PRO_MONTHLY_PLAN_ID= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,90 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# Taxonomy | ||
|
||
## Features | ||
An open source application built using the new router, server components and | ||
everything new in Next.js 13. | ||
|
||
- [React.js 18](https://reactjs.org/blog/2022/03/29/react-v18.html) | ||
- [Next.js 13](https://nextjs.org/blog/next-12) | ||
- [Typescript 4](https://www.typescriptlang.org/) | ||
- [Tailwind CSS 3](https://tailwindcss.com/docs/) | ||
- [Eslint 7](https://eslint.org/docs/user-guide/getting-started) | ||
- [Prettier 2](https://prettier.io/docs/en/index.html) | ||
- [Husky 7](https://typicode.github.io/husky/#/) | ||
- [Lint Staged 13](https://github.com/okonet/lint-staged) | ||
> **Warning** This app is a work in progress. I'm building this in public. You | ||
> can follow the progress on Twitter [@shadcn](https://twitter.com/shadcn). See | ||
> the roadmap below. | ||
## Usage | ||
## About this project | ||
|
||
This project using node >= 16.14.2 & yarn | ||
This project as an experiment to see how a modern app (with features like | ||
authentication, subscriptions, API routes, static pages for docs ...etc) would | ||
work in Next.js 13 and server components. | ||
|
||
### Installation | ||
**This is not a starter template.** | ||
|
||
```bash | ||
git clone https://github.com/Zac-Zajdel/PrismaNext.git | ||
``` | ||
A few people have asked me to turn this into a starter. I think we could do that | ||
once the new features are out of beta. | ||
|
||
```bash | ||
yarn install | ||
``` | ||
## Note on Performance | ||
|
||
## Setup Prisma | ||
> **Warning** This app is using the unstable releases for Next.js 13 and | ||
> React 18. The new router and app dir is still in beta and not | ||
> production-ready. **Expect some performance hits when testing the dashboard**. | ||
> If you see something broken, you can ping me | ||
> [@shadcn](https://twitter.com/shadcn). | ||
Create a `.env` file and setup DATABASE_URL variable for example: | ||
## Features | ||
|
||
```bash | ||
DATABASE_URL="mysql://root:password@localhost:3306/next" | ||
- New `/app` dir, | ||
- Routing, Layouts, Nested Layouts and Layout Groups | ||
- Data Fetching, Caching and Mutation | ||
- Loading UI | ||
- Route handlers | ||
- Metadata files | ||
- Server and Client Components | ||
- API Routes and Middlewares | ||
- Authentication using **NextAuth.js** | ||
- ORM using **Prisma** | ||
- Database on **PlanetScale** | ||
- UI Components built using **Radix UI** | ||
- Documentation and blog using **MDX** and **Contentlayer** | ||
- Subscriptions using **Stripe** | ||
- Styled using **Tailwind CSS** | ||
- Validations using **Zod** | ||
- Written in **TypeScript** | ||
|
||
## Roadmap | ||
|
||
- [x] ~Add MDX support for basic pages~ | ||
- [x] ~Build marketing pages~ | ||
- [x] ~Subscriptions using Stripe~ | ||
- [x] ~Responsive styles~ | ||
- [x] ~Add OG image for blog using @vercel/og~ | ||
- [x] Dark mode | ||
|
||
## Known Issues | ||
|
||
A list of things not working right now: | ||
|
||
1. ~GitHub authentication (use email)~ | ||
2. ~[Prisma: Error: ENOENT: no such file or directory, open '/var/task/.next/server/chunks/schema.prisma'](https://github.com/prisma/prisma/issues/16117)~ | ||
3. ~[Next.js 13: Client side navigation does not update head](https://github.com/vercel/next.js/issues/42414)~ | ||
4. [Cannot use opengraph-image.tsx inside catch-all routes](https://github.com/vercel/next.js/issues/48162) | ||
|
||
## Running Locally | ||
|
||
1. Install dependencies using yarn: | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
Run the following command to create generate Schema & Migration & Seed Table | ||
2. Copy `.env.example` to `.env.local` and update the variables. | ||
|
||
```bash | ||
yarn prisma migrate dev --name init | ||
```sh | ||
cp .env.example .env.local | ||
``` | ||
|
||
#### Development | ||
3. Start the development server: | ||
|
||
```bash | ||
```sh | ||
yarn dev | ||
``` | ||
|
||
Reset your database to generate your own migration: | ||
|
||
```bash | ||
yarn prisma migrate reset | ||
``` | ||
|
||
If you change the seeder file, you can easily run the seeder with the following: | ||
|
||
```bash | ||
yarn prisma db seed | ||
``` | ||
## License | ||
|
||
#### Production | ||
|
||
```bash | ||
npm run build or yarn build | ||
yarn start | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/user](http://localhost:3000/api/user). This endpoint can be edited in `pages/api/user.ts`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
``` | ||
``` | ||
Licensed under the | ||
[MIT license](https://github.com/shadcn/taxonomy/blob/main/LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
interface AuthLayoutProps { | ||
children: React.ReactNode | ||
} | ||
|
||
export default function AuthLayout({ children }: AuthLayoutProps) { | ||
return <div className="min-h-screen">{children}</div> | ||
} |
Oops, something went wrong.
e01b4ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
jottings – ./
jottings-seven.vercel.app
jottings-zac-zajdel.vercel.app
jottings-git-main-zac-zajdel.vercel.app
jottings.dev