Discover a robust full-stack web development starter project built with TypeScript, Next.JS, Supabase, PostgreSQL, TailwindCSS, and Zustand! This project offers a powerful foundation for building modern web applications with ease, providing developers with optimized performance, easy-to-use APIs, customizable styling, and simplified state management.
Zustand | TailwindCSS | Next-Auth | Supabase
# Install dependencies
yarn install
# Run development server
yarn dev
Open 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.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
We're using Supabase with Next-Auth for authentication and authorization.
NOTE: You can import the schema from
supabase/schema.sql
to your Supabase instance.
For the integration, check and following the steps in Next-Auth documentation: https://authjs.dev/reference/adapter/supabase
After setting up your Supabase instance and configuration, generating types for your database is an important step towards improving your development workflow. By generating types, you can ensure type safety and catch potential errors earlier in the development process.
To generate types for your Supabase database, follow these steps:
supabase gen types typescript --project-id "YOUR_INSTANCE" --schema public > types/database.types.ts
# Replace "YOUR_INSTANCE" with your actual Supabase instance ID.
types/database.types.ts
file. You can modify the command to include other schemas as needed.import { Database } from '@types/database.types.ts'
You can deploy your application with Vercel or Docker
The image build will be in standalone
mode with a very small image size.
# Builds the image, starts the container and expose the app vía nginx
docker-compose up -d
# Stop the container
docker-compose down
If you need to rebuild the image, you can use the following command:
docker-compose up -d --build webapp