Next-auth
File Structure

File structure of Next Auth Boilerplate

"Content" Folder

Contains the content for the blog. You can add your blogs here.

"Prisma" Folder

Contains the database schema and the database connection file.

"Public" Folder

Contains the public assets like images, favicons, etc.

"Src" Folder

Contains the source code of the project including the API routes, components, and pages.

"App" Folder

Contains the pages of the project.

"Components" Folder

Contains the reusable components of the project.

"lib" Folder

Contains the utility functions and hooks

  • Checking User Authentication
  • Fetching User Data
  • Authentication Options

"config.ts" File

Contains the configuration of the project like the site name, site URL, etc.

File Structure

- 📁 SaasUnderOne
  - 📁 content
    - 📁 blog - Add Blogs here
      - 📄 home.mdx
      - 📄 ....mdx
  - 📁 prisma
    - 📄 db.ts 
    - 📄 schema.prisma - Add your models here.
  - 📁 public - Add your images here.
    - 📄 favicon.ico
    - 📄 logo.svg
    - 📄 ...
  - 📁 src
    - 📁 app
        - 📁 api
          - 📁 auth 
            - 📁 [...nextauth]
          - 📁 checkout
          - 📁 portal
          - 📁 webhooks
        - 📁 blog
        - 📁 dashboard
        - 📁 login
        - 📄 error.tsx
        - 📄 globals.css
        - 📄 favicon.ico
        - 📄 layout.tsx
        - 📄 page.tsx
        - 📄 robots.ts
        - 📄 not-found.tsx
        - 📄 loading.tsx
    - 📁 components
       - 📁 ui  - ShadCN UI components.
       - 📁 email-templates
       - 📁 forms
       - 📁 landing-page
       - 📁 mdx 
       - 📄 ...
    - 📁 lib  
      - 📄 ...
  - 📄 package.json
  - 📄 README.md
  - 📄 config.ts - Configuration for your project.
  - 📄 .env.example - Change this to .env.local