Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
▲ A heavily opinionated starter template.
License
neogeek/create-app
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
⚠️ Notice: This repository is under active development. Things will be missing, broken, or incomplete as development continues.
This repo is my heavily opinionated starter template. Every so often I like to revisit what my tech stack consists of and currently this is it. The focus of this project is to maintain a base set of functionality for creating a bleeding edge app in Next.js with end to end type safety and testing built in.
Everyone is welcome to use this starter template, report bugs, and suggest changes. Keep in mind that this is my personal tech stack, so I might not implement all suggestions.
- ▲Turborepo - Monorepo support
- ▲Next.js 14 - React framework
- 🦺TypeScript - Type safety code base
- 📦tRPC - Type safe client and server side API requests
- 🎯trpc-openapi - Dynamic REST endpoints and automatic Swagger documentation
- 💎zod - Data validation and parsing
- ✅validator - String validation types
- 🏔️Prisma - Database ORM
- 🗄️Postgres - Local database
- ⚡️Supabase - Remote database
- 🪐PlanetScale - Optional remote database
- 🍃Tailwind CSS - Utility styles
- 📝Tailwind Forms Plugin - Form utility styles
- 🪄Framer Motion - CSS animations
- 🃏Jest - Unit tests
- 🚨Sentry - Server and client side error logging
- 📘Storybook - Component library
- 🐙Testing Library - Testing library for UI components
- 🎭Playwright - Running end to end tests on the web app
- 🎛️Github Actions - Continuous integration testing
- 🐳Docker - Optional local development
- 🌊DigitalOcean - Remote deployment with Docker
- ▲Turborepo - Monorepo support
- ▲Vercel - Remote deployment
- 🌎Netlify - Remote deployment
- Fork, "Use this template" via GitHub or clone locally and remove remote to create a repo.
- Install dependencies with
npm ci. - Create an
.env.localfile in./apps/web/with the contents of.env.example - Generate JWT keys by running
./apps/web/bin/generate_jwt_keys.sh <password>. - Setup Google OAuth for your apphttps://support.google.com/cloud/answer/6158849 and copy the
idandsecretinto.env.local. - Addhttp://localhost:3000/oauth/google/callback to the list ofAuthorized redirect URIs for your Google OAuth web application.
- Generate the database types with
npm run db:generate(if you have VS Code open, run TypeScript: Reload project to see the updated types) - Setup the database with
npm run db:push - Run with
npm run dev
- InstallPostgres
- Create
create-appdatabase - Setup the database with
npm run db:push
- Create database
- Go to Project Settings > Database
- Copy and paste the connection string into
.env.localas the value forDATABASE_URL - Replace
[YOUR-PASSWORD]with your password you made when creating the database. - Append
?pgbouncer=trueto the connection string if Connection Pooling is enabled. - Push changed to database with
npm run db:push
Create database
Go to Settings > Password
Create new password
Supply a name for the password
Hit generate password
Change the Connection string dropdown to
PrismaCopy and paste the URL into
.env.localOpen
packages/database/prisma/schema.prismaand update the datasource value to the following:datasource db { provider = "mysql" url = env("DATABASE_URL") relationMode = "prisma"}Push changed to database with
npm run db:push
It's recommended that when setting up Sentry that you limit the allowed domains in your project settings so only logs from your application can be logged.
The included docker setup can be used for developing on a machine without Node.js or Postgres installed. It can also be modified to be deployed to an online service, like DigitalOcean.
$ docker compose up --detach
$ docker compose down
Jest tests are setup to work both locally and via GitHub Actions.
Run the following to run all tests that match*.test.ts or*.test.tsx.
$ npmtestOr if you want to run a specific file:
$ npmtest -- -- ./apps/web/src/modules/auth/controller.test.tsStorybook testing requires storybook to be built and the static storybook running on a server in the background. The following command does all of this for you to prevent having to have two terminal windows open.
$ npm run test:styleguide
If you would like to run the tests in two terminal windows you can run the following commands:
$ npm run storybook-static
$ npm run test-storybook
GitHub Actions workflows will lint all files, attempt a build and then run all unit tests. This workflow will run either when commits are pushed directly to the main branch or when a Pull Request is created (not a draft).
If you have any questions regarding the use of@neogeek/create-app, please use eitherGitHub Discussions orDiscord server. The issue tracker is to be used for bug reports and feature requests only.
Be sure to review theContributing Guidelines before logging an issue or making a pull request.
If you are having issues making database requests to your Supabase database, make sure you are using the correct connection string (pooled or unpooled). See this ticket for more informationprisma/prisma#12121 and thePrisma documentation.
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE?pgbouncer=true"About
▲ A heavily opinionated starter template.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
