A nullslate project template.
-
Install dependencies:
npm install
-
Set up environment variables:
Copy
.env.exampleto.envand fill in the values:cp .env.example .env
-
Set up the database (if using PostgreSQL):
# Create the database createdb {{project_name}} # Update DATABASE_URL in .env
-
Configure GitHub OAuth (if using auth):
- Go to GitHub Developer Settings
- Create a new OAuth App
- Set the callback URL to
http://localhost:3000/api/auth/callback/github - Copy the Client ID and Client Secret to
.env
-
Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
├── app/ # Next.js App Router pages
│ ├── api/ # API routes
│ │ └── auth/ # NextAuth.js handlers
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── navbar.tsx # Navigation bar
│ ├── footer.tsx # Footer
│ ├── theme-provider.tsx # Theme context
│ └── query-provider.tsx # React Query provider
├── lib/ # Utility functions
│ └── db.ts # Database connection
├── auth.ts # NextAuth.js configuration
├── auth.config.ts # Auth providers config
└── types/ # TypeScript type definitions
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS 4
- UI Components: @thesandybridge/ui
- Themes: @thesandybridge/themes
- Authentication: NextAuth.js v5
- Database: PostgreSQL with node-postgres
- Data Fetching: TanStack Query
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Build for production |
npm run start |
Start production server |
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
AUTH_SECRET |
Random secret for NextAuth.js |
AUTH_GITHUB_ID |
GitHub OAuth App Client ID |
AUTH_GITHUB_SECRET |
GitHub OAuth App Client Secret |
JWT_SECRET |
Secret for signing API tokens |
This project is configured for deployment on Railway.
- Connect your GitHub repository
- Add the environment variables
- Deploy