Skip to content

Latest commit

Β 

History

History
125 lines (85 loc) Β· 3.15 KB

File metadata and controls

125 lines (85 loc) Β· 3.15 KB

Full-Stack Application with Next.js and Express

A modern, robust full-stack web application featuring a responsive Next.js frontend and a secure Express.js backend.

πŸš€ Tech Stack

Frontend (/client)

Backend (/server)


✨ Features

  • Secure Authentication: Complete auth flow using JWT on the backend and NextAuth on the frontend.
  • RESTful API: Structured backend routes and controllers.
  • Data Validation: Joi integration to validate incoming API requests.
  • Modern UI: Pre-configured with Tailwind CSS v4 and DaisyUI v5 for rapid and aesthetic UI development.
  • Responsive Design: Fully responsive across desktop, tablet, and mobile devices.

πŸ“‚ Project Structure

fullstackapp/
β”œβ”€β”€ client/                 # Next.js Frontend
β”‚   β”œβ”€β”€ package.json
β”‚   └── ... (Next.js files & directories)
β”œβ”€β”€ server/                 # Express.js Backend
β”‚   β”œβ”€β”€ index.js            # Entry point for the API server
β”‚   β”œβ”€β”€ package.json
β”‚   └── ... (Controllers, Routes, Models, etc.)
└── Readme.md               # Project documentation

πŸ› οΈ Getting Started

Prerequisites

Make sure you have the following installed:

  • Node.js (v18 or higher recommended)
  • MongoDB (Local instance or MongoDB Atlas)

1. Clone the repository

git clone <your-repository-url>
cd fullstackapp

2. Setup the Backend (/server)

Navigate to the server directory and install dependencies:

cd server
npm install

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

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key

Start the backend server:

npm start

The server will typically run on http://localhost:5000.

3. Setup the Frontend (/client)

Open a new terminal window, navigate to the client directory, and install dependencies:

cd client
npm install

Create a .env.local file in the client directory and add the following variables:

NEXT_PUBLIC_API_URL=http://localhost:5000
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret

Start the frontend development server:

npm run dev

The Next.js app will run on http://localhost:3000.


πŸ“œ License

This project is licensed under the ISC License.

πŸ‘€ Author

  • tamim