The Telecom Services Application is a full-stack web application that allows users to sign up, log in, manage their profiles, and browse available telecom plans. The project is built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. The application features a user authentication system, profile management, and a catalog of telecom plans that users can explore.
Before running the project, ensure you have the following installed:
- Node.js
- MongoDB (You can use MongoDB Atlas for a cloud-based solution)
- A package manager (like npm or yarn)
git clone https://github.com/your-username/telecom-services-app.git
cd telecom-services-app
-
Navigate to the
server
directory:cd server
-
Install the dependencies:
npm install
-
Create a
.env
file in theserver
directory and add your MongoDB connection string and any other environment variables:MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/myDatabase?retryWrites=true&w=majority JWT_SECRET=your_jwt_secret_key
-
Start the server:
npm start
The server should now be running on
http://localhost:5000
.
-
Navigate to the
client
directory:cd ../client
-
Install the dependencies:
npm install
-
Start the React development server:
npm start
The frontend should now be running on
http://localhost:3000
.
With both the frontend and backend servers running, open your browser and go to http://localhost:3000
. You should be able to interact with the application as described in the project functionality.
Here is the file structure for the project:
telecom-services-app/
│
├── client/ # Frontend React application
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── components/
│ │ │ ├── Auth.css
│ │ │ ├── Home.js
│ │ │ ├── Login.js
│ │ │ ├── Navbar.js
│ │ │ ├── PlanList.js
│ │ │ ├── Signup.js
│ │ │ └── UserProfile.js
│ │ ├── index.css
│ │ ├── index.js
│ │ └── App.js
│ ├── package.json
│ └── README.md
│
├── server/ # Backend Express application
│ ├── config/
│ │ └── db.js # MongoDB connection configuration
│ ├── models/
│ │ └── User.js # Mongoose model for users
│ ├── routes/
│ │ ├── auth.js # Authentication routes
│ │ ├── profile.js # Profile routes
│ │ └── plans.js # Telecom plans routes
│ ├── .env # Environment variables
│ ├── server.js # Main entry point for the server
│ ├── package.json
│ └── README.md
│
├── .gitignore
├── README.md
└── package.json