https://github.com/samuelsenerwa/lingual
Client application close to duo lingo
https://github.com/samuelsenerwa/lingual
drizzle-orm duolingo neon nextjs14 postgresql shadcn-ui tailwindcss typescript vercel
Last synced: 2 months ago
JSON representation
Client application close to duo lingo
- Host: GitHub
- URL: https://github.com/samuelsenerwa/lingual
- Owner: samuelsenerwa
- License: gpl-3.0
- Created: 2024-05-04T12:27:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-26T12:43:16.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T08:18:21.076Z (over 1 year ago)
- Topics: drizzle-orm, duolingo, neon, nextjs14, postgresql, shadcn-ui, tailwindcss, typescript, vercel
- Language: TypeScript
- Homepage: https://duo-lingual.vercel.app/
- Size: 1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Running drizzle scripts
add these lines in your `package.json` file
```
"db:generate": "pnpm drizzle-kit generate:pg --schema db/schema.ts --out ./drizzle",
"db:migrate": "bun ./script/migrate.ts",
"db:studio": "pnpm drizzle-kit studio"
```
Alternative for this one ` "db:migrate": "bun ./script/migrate.ts",` can be using `tsx` to run it simply by typing ` "db:migrate": "tsx ./script/migrate.ts",` the reason is node doesn't support the content that I have included in my `migrate.ts` file, technically is like we're doing a work around. For more information you can checkout drizzle documentation for advanced guide.
## Running them in the terminal
### 1. Generating migration
Make sure to run the scripts independetly
```
pnpm dev
pnpm db:generate
```
### 2. Pushing the scripts to Neon using Drizzle ORM
```
pnpm drizzle-kit migrate
```
if you get the error of `pg` not installed you can simply do `npm add pg -D`
**DISCLAIMER!** If this doesn't work, kindly check my `package.json` to adjust the version of drizzle you're using.
# Screenshots

# LICENSE
The project is licensed by GNU GENERAL PUBLIC LICENSE