A dashboard management system to track, add, and view project sites. This application is built using React and Next.js for the frontend, and it interacts with the backend to fetch and save project details for a seamless user experience.
- Project Overview
- Features
- Tech Stack
- Setup and Installation
- API Endpoints
- Usage
- Contributing
- License
The Site Dashboard Management System is a web-based application that allows users to create, view, and manage project sites. Users can add new project sites by providing project name, description, and location. The dashboard displays these projects in a card-based layout. Each project can be clicked to view more details.
- 📝 Add New Projects: Users can add new projects with name, description, and location using a modal form.
- 🗃️ View Existing Projects: Displays a list of all added projects in a clean, card-based format.
- 🔄 Dynamic Loading: The app dynamically fetches and displays the projects associated with the logged-in user.
- 💡 Skeleton Loading Animation: Shows a skeleton loader while data is being fetched, providing better UX.
- 🔒 Secure Access: Projects are fetched based on the logged-in user's email, ensuring data privacy.
- Frontend: React, Next.js, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Libraries: Axios for HTTP requests, React Hook Form for form handling
- Styling: Tailwind CSS for modern and responsive design
- Authentication: JWT for secure user authentication
- Node.js (>=14.0.0)
- npm or yarn
- MongoDB instance (local or cloud-based)
-
Clone the repository:
git clone https://github.com/friedavocadoes/SP.git/ cd SP
-
Install dependencies:
npm install
or
yarn install
-
Setup environment variables: Create a
.env
file in the root directory and add the following:MONGODB_URI=<Your MongoDB URI> JWT_SECRET=<Your JWT Secret> NEXT_PUBLIC_API_URL=http://localhost:3000
-
Run the development server:
npm run dev
or
yarn dev
The application should now be running at http://localhost:3000.
The application interacts with several backend endpoints to fetch, save, and update project data. Below is a list of the API routes:
- User Authentication
GET /api/users/me
: Get current user information based on JWT token.
- Project Management
POST /api/project/fetch
: Fetch all projects for the logged-in user.POST /api/project/save
: Save a new project for the user.
- Login to your account: The app authenticates using JWT tokens. Once logged in, your projects will be fetched and displayed.
- Add a new project: Click on the 'Add New Project' card to open a modal form. Fill in the project details and click 'Add Project' to save.
- View Projects: The dashboard displays your projects as cards. Click on any project card to view more details.
Contributions are welcome! If you find a bug or have a feature request, please create an issue on GitHub. Feel free to fork the repository and submit a pull request with your changes.
This project is in the process of Licensing.
If you have any questions or need further assistance, feel free to reach out. Happy coding! ✨