Skip to content

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

CommandDescription
npm run devStart development server with Turbopack
npm run buildBuild for production
npm run startStart production server

Environment Variables

VariableDescription
DATABASE_URLPostgreSQL connection string
AUTH_SECRETRandom secret for NextAuth.js
AUTH_GITHUB_IDGitHub OAuth App Client ID
AUTH_GITHUB_SECRETGitHub OAuth App Client Secret
JWT_SECRETSecret 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

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages