A simple full-stack application built with Node.js, Express.js, React.js, and MongoDB.
- About
- Features
- Architecture
- Technologies
- Getting Started
- Usage
- Environment Setup
- Available Scripts
- Configuration & Environment Variables
- Folder Structure
- Contributing
- License
This repository houses node-app, a full-stack web application built using a Node.js + Express.js backend, a React.js frontend, and MongoDB as the database. The application is designed as a starting point for building RESTful services and rich user interfaces, showcasing practical integration between modern technologies.
- REST API backend built with Express.js
- Dynamic frontend using React.js, with modern UI design
- Database integration via MongoDB (with Mongoose)
- Fully configured
Dockerfileanddocker-compose.ymlfor easy deployment - Built-in CI/CD support (e.g., via CircleCI and GitHub Actions)
- Coding standards enforced via ESLint and Prettier
- TypeScript for enhanced type safety
┌──────────────────┐ ┌──────────────────┐
│ Client │ <──HTTP──> │ Server │
│ (React.js SPA) │ │ (Express.js API)│
└──────────────────┘ └──────────────────┘
│ │
└─── Static Build / Dev ───┘
↓
┌───────────────┐
│ MongoDB │
│ (Mongoose ORM)│
└───────────────┘
- The frontend (client directory) handles views, components, and user interactions.
- The backend (server directory) defines routes, controllers, models, and business logic.
- MongoDB stores application data, accessed via Mongoose schemas in the backend.
- Node.js – JavaScript runtime
- Express.js – Back-end routing and middleware
- React.js – Front-end UI library
- MongoDB – NoSQL database
- Mongoose – MongoDB object modeling for Node.js
- TypeScript – Static type checking
- Docker – Containerization
- CircleCI / GitHub Actions – Continuous integration pipelines
- ESLint & Prettier – Code formatting and linting
-
Clone the repository
git clone https://github.com/lokeshg-sde/node-app.git cd node-app -
Install dependencies for both backend and frontend
cd server && npm install cd ../client && npm install
-
Rename
.env.exampleto.envand populate required variables (database URI, API keys, etc.)
cd server
npm run devcd client
npm startTo start both services via Docker:
docker-compose up --buildnpm run dev– Starts server in development mode (with hot reload)npm run build– Builds production server (if applicable)npm test– Runs backend tests (if implemented)
npm start– Runs React development servernpm run build– Generates optimized production build
Copy .env.example to .env in the server directory and set:
PORT– Backend server portMONGO_URI– MongoDB connection string- Any other required API keys or secrets
You may also configure frontend environment variables under client/.env.
node-app/
├── server/ # Express backend
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── config/
│ └── index.ts
├── client/ # React frontend
│ ├── src/
│ ├── public/
│ └── ...
├── .env.example
├── Dockerfile
├── docker-compose.yml
└── README.md
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (e.g.,
feature/example) - Commit changes with descriptive messages
- Open a Pull Request and describe your changes
- Optionally, run linting and tests before submitting
This project is licensed under the MIT License. See the LICENSE file for details.