Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 106 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
# Next.js Starter App

This is a blog app built with Next.js, Prisma, and Tailwind CSS. It includes authentication, a blog, and various components to help you get started quickly.

## Table of Contents

- [Features](#features)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Running the Development Server](#running-the-development-server)
- [Project Structure](#project-structure)
- [Environment Variables](#environment-variables)
- [Scripts](#scripts)
- [Salutation](#salutation)
- [Contributing](#contributing)
- [License](#license)

## Features

- **Next.js**: The React framework for production.
- **Prisma**: Next-generation ORM for Node.js and TypeScript.
- **Tailwind CSS**: A utility-first CSS framework for rapid UI development.
- **Authentication**: User authentication with JWT and NextAuth.
- **Blog**: A simple blog with posts and authors.
- **Components**: Reusable components like Navbar, Footer, Hero, etc.

## Getting Started

First, install the dependencies:
### Prerequisites

- Node.js (v14 or higher)
- npm or yarn

### Installation

First, clone the repository:

```bash
git clone https://github.com/yourusername/next14-app.git
cd next14-app
```

Then, install the dependencies:

```bash
npm install
Expand All @@ -12,8 +53,9 @@ pnpm install
bun install
```

### Running the Development Server

run the development server:
Run the development server:

```bash
npm run dev
Expand All @@ -26,3 +68,65 @@ bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Project Structure

```plaintext
.env
.eslintrc.json
.gitignore
jsconfig.json
next.config.js
package.json
postcss.config.js
README.md
tailwind.config.js
.next/
prisma/
public/
src/
```

- **.env**: Environment variables.
- **.eslintrc.json**: ESLint configuration.
- **.gitignore**: Git ignore file.
- **jsconfig.json**: JavaScript configuration.
- **next.config.js**: Next.js configuration.
- **package.json**: Project dependencies and scripts.
- **postcss.config.js**: PostCSS configuration.
- **README.md**: Project documentation.
- **tailwind.config.js**: Tailwind CSS configuration.
- **.next/**: Next.js build output.
- **prisma/**: Prisma schema and migrations.
- **public/**: Static assets.
- **src/**: Source code.

## Environment Variables

Create a `.env` file in the root directory and add the following variables:

```plaintext
DATABASE_URL="your-database-url"
DIRECT_URL="your-direct-database-url"
JWT_SECRET="your-jwt-secret"
NEXT_PUBLIC_API_URL="http://localhost:3000"
```

## Scripts

- `dev`: Runs the development server.
- `build`: Builds the application for production.
- `start`: Starts the production server.
- `lint`: Runs ESLint.

## Salutation

Special thanks to [lamadev](https://github.com/safak) for the original repository that this project is forked from.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

## License

This project is licensed under the MIT License.
27 changes: 25 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "picsum.photos",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "cdn.jsdelivr.net",
port: "",
pathname: "/**",
},
],
},
};

module.exports = nextConfig
module.exports = nextConfig;
Loading