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