Skip to content

nullslate/app-template

Repository files navigation

{{project_name}}

A nullslate project template.

Getting Started

  1. Install dependencies:

    npm install
  2. Set up environment variables:

    Copy .env.example to .env and fill in the values:

    cp .env.example .env
  3. Set up the database (if using PostgreSQL):

    # Create the database
    createdb {{project_name}}
    
    # Update DATABASE_URL in .env
  4. 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
  5. Run the development server:

    npm run dev

    Open http://localhost:3000 in your browser.

Project Structure

├── 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

Tech Stack

Scripts

Command Description
npm run dev Start development server with Turbopack
npm run build Build for production
npm run start Start production server

Environment Variables

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

Deployment

This project is configured for deployment on Railway.

  1. Connect your GitHub repository
  2. Add the environment variables
  3. Deploy

Created With

nullslate

About

App template for nullslate projects

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages