A web application designed to manage resources categorized by different topics. The app allows users to browse resources by category, and admins can add, edit, and delete resources. This system is built with Node.js, Express, Handlebars, and MongoDB.
- Browse Resources: Users can browse resources by categories.
- Admin Controls: Admin users can add, edit, and delete resources.
- Category-Based Display: Resources are displayed under specific categories.
- Link to Resources: Each resource contains a link that opens in a new tab.
- Responsive Design: The app is responsive and mobile-friendly.
- This is the homepage where users can browse resources categorized by topics.
- The resources page displays resources categorized by topics. Users can click on the categories to see resources.
- Admin users can add new resources through this page. It includes fields for the resource name, category, description, and link.
- Admin users can edit existing resources using this page. The form is pre-filled with the resource's current details for easy editing.
- The login page allows users to sign in with their credentials. Admin users can log in to manage resources.
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/ashish-makes/devbox.git
-
Navigate into the project directory:
cd devbox
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add the following:PORT=3000 DB_URL=your-database-url SESSION_SECRET=your-session-secret
-
Run the application:
npm start
-
Access the app: Open your browser and go to
http://localhost:3000
.
- Browse Resources: Users can browse resources listed by categories.
- Add Resource (Admin Only): Admin users can navigate to the
/add-resource
page to add new resources. - Edit Resource (Admin Only): Admins can click on the "Edit" button next to resources to modify them.
- Delete Resource (Admin Only): Admins can delete resources using the "Delete" button.
- Login: Both admins and regular users must log in to access restricted pages. Admins get extra functionality like adding, editing, and deleting resources.
The app requires login to access certain pages. Admin users have additional permissions to manage resources.
- Navigate to the login page.
- Enter the username and password (admin credentials are provided for admin users).
- Once logged in, users will have access to their respective resources page, while admins will see the admin controls for managing resources.
Only admins have access to the following features:
- Add Resource: Admins can add a new resource by filling out a form with resource details.
- Edit Resource: Admins can edit any existing resource.
- Delete Resource: Admins can remove resources they no longer want in the system.
- Node.js: Backend framework to build the server.
- Express: Framework to handle HTTP requests and routing.
- MongoDB: NoSQL database for storing resources and user data.
- Handlebars: Templating engine for rendering dynamic HTML.
- CSS: Styling for the app (CSS frameworks like Bootstrap can be used).
We welcome contributions! To contribute to this project, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push your changes to the branch (
git push origin feature/your-feature
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Handlebars for dynamic templating.
- Express for the backend framework.
- MongoDB for database management.