A boilerplate setup for starting any modern web application, including a React-based frontend and an Express.js backend. This setup integrates essential tools and libraries for efficient development and scalability.
The repository contains two main directories:
- Frontend: Built with React, Tailwind CSS, and Vite for fast development and a responsive UI.
- Backend: Powered by Express.js, MongoDB, and essential middleware for secure and scalable APIs.
- React for building interactive UIs.
- React Router for dynamic navigation.
- Firebase for authentication and hosting.
- Axios for API calls.
- React Hook Form for form handling.
- Tailwind CSS for a responsive design.
- React Query for server-state management.
- Express.js for creating APIs.
- MongoDB for database management.
- JWT for secure authentication.
- CORS and cookie-parser for handling cross-origin and cookie-based requests.
- Frontend Repository: This repository serves as the main full-stack setup and includes the frontend setup.
- Backend Repository: Backend Repo
- Node.js installed on your system.
- MongoDB setup for database functionality.
- Node.js and npm installed
- MongoDB connection string
-
Clone the client-side repository:
git clone https://github.com/tariqul420/Full-Stack_Setup.git cd Full-Stack_Setup
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open the project in a code editor:
code .
-
Add the
.env
file in the root directory and include the following environment variables:VITE_API_KEY=YOUR_VITE_API_KEY VITE_AUTH_DOMAIN=YOUR_VITE_AUTH_DOMAIN VITE_PROJECT_ID=YOUR_VITE_PROJECT_ID VITE_STORAGE_BUCKET=YOUR_VITE_STORAGE_BUCKET VITE_MESSAGE_SENDER_ID=YOUR_VITE_MESSAGE_SENDER_ID VITE_APP_ID=YOUR_VITE_APP_ID VITE_MEASUREMENT_ID=YOUR_VITE_MEASUREMENT_ID VITE_IMGBB_API_KEY=VITE_IMGBB_API_KEY VITE_SERVER_API_URL=YOUR_VITE_API_URL
Note: Replace the
VITE_API_KEY
andVITE_AUTH_DOMAIN
, along with other placeholders, with actual values.
-
Clone the client-side repository:
git clone https://github.com/tariqul420/Full-Stack_Server_Setup.git cd Service-Orbit-Server
-
Install dependencies:
npm install
-
Start the server:
node index.js
--- OR ---
Note Note: Ensure
nodemon
is installed globally or locally in your project. To install it globally, run:nodemon index.js
-
Open the project in a code editor:
code .
-
Add the
.env
file in the root directory and include the following environment variables:DATABASE_USERNAME=YOUR_DATABASE_USERNAME DATABASE_PASSWORD=YOUR_DATABASE_PASSWORD ACCESS_TOKEN_SECRET=YOUR_ACCESS_TOKEN_SECRET NODEMAILER_USER=YOUR_NODEMAILER_USER NODEMAILER_PASS=YOUR_NODEMAILER_USER
Note: Replace the
index.js
file'syour_mongo_connection_string
and the.env
file'sYOUR_DATABASE_USERNAME
,YOUR_DATABASE_PASSWORD
, andYOUR_ACCESS_TOKEN_SECRET
with actual values.