This project is a full-stack web application built using the MERN stack (MongoDB, Express.js, React.js, and Node.js). It demonstrates a complete guide on how to develop a scalable and robust MERN stack application from scratch.
mern-stack-project/
āāā server/
ā āāā db/
ā ā āāā connection.js
ā āāā node_modules/
ā āāā routes/
ā ā āāā record.js
ā āāā .env
ā āāā package-lock.json
ā āāā package.json
ā āāā server.js
āāā client/
ā āāā src/
ā ā āāā Asserts/
ā ā āāā components/
ā ā ā āāā Navbar.jsx
ā ā ā āāā Record.jsx
ā ā ā āāā RecordList.jsx
ā ā āāā App.jsx
ā ā āāā App.css
ā ā āāā index.css
ā ā āāā main.jsx
ā āāā public/
ā āāā package.json
āāā .env
āāā README.md
āāā package.json
āāā .gitignore
āāā eslint.config.js
āāā index.html
āāā postcss.config.js
āāā tailwind.config.js
āāā vite.config.js
Make sure you have the following installed:
git clone https://github.com/Colyzo466/mern-stack-project.git
cd mern-stack-project
cd server
npm install
Create a .env
file in the server/
directory and add:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
PORT=5000
Run the backend server:
npm start
cd ../client
npm install
npm run dev
server.js
and initialize Express.js.db/connection.js
.routes/record.js
..env
.Navbar.jsx
, Record.jsx
, and RecordList.jsx
.App.css
and index.css
.App.jsx
as the main component.vite.config.js
.Method | Endpoint | Description |
---|---|---|
GET | /api/records | Fetch all records |
POST | /api/records | Create a new record |
PUT | /api/records/:id | Update a record |
DELETE | /api/records/:id | Delete a record |
Contributions are welcome! Feel free to open issues or create pull requests.
This project is licensed under the MIT License.