Shopdesk is a web-based retail management system that simplifies stock tracking for retailers. It solves the problem of inefficient stock management by providing a user-friendly interface for adding, viewing, editing, and soft-deleting stock items. With secure user authentication, retailers can confidently manage their inventory and ensure accurate stock records.
User Authentication:
- Users can log in with their email and password.
- Incorrect credentials block access to the system.
Stock Management:
- Add Stock: Users can add new stock items with details like name, SKU code, price, and quantity.
- View Stock: Users can view a list of all active stock items.
- Edit Stock: Users can update stock details (name, price, quantity) while keeping SKU codes read-only.
- Soft-Delete Stock: Stock items can be soft-deleted, meaning they are hidden from the stock list but remain stored in the database with a 'deleted' status.
Frontend:
- Next.js (React framework for server-side rendering and static site generation).
- Tailwind CSS (utility-first CSS framework for styling).
- shadcn/ui: A collection of reusable, accessible, and customizable UI components built with Radix UI and Tailwind CSS.
Package Manager:
- Bun: A fast all-in-one JavaScript runtime and package manager (used for dependency management and running scripts).
Follow these steps to set up and run the project locally.
Bun: Install Bun by following the official guide: Bun installation
-
Clone the repository:
git clone https://github.com/hngprojects/shopdesk-fe.git
-
Navigate to the project directory
cd SHOPDESK-FE
-
Install dependencies
bun install
-
Run the development server
bun run dev
-
Access the application
Click the http://localhost:{port} link provided to open the project.
Before you start contributing on this project remember to:
- Ensure that all UI components and pages are implemented to match the Figma design as closely as possible, striving for pixel-perfect accuracy.
- Pay attention to details such as spacing, typography, colors, and component alignment
-
Go to the original repository: Github repository link
-
Click the Fork button at the top right of the page.
-
GitHub will prompt you to create a fork. By default, the repository will have the same name (shopdesk-fe).
-
Click Create Fork.
Clone your forked repository to your local machine:
git clone https://github.com/your-username/shopdesk-fe.git
Create a new branch for your feature or bugfix. Use the following naming convention:
git checkout -b feat/HNG-2145-your-feature-name
Replace your-feature-name with a short description of your feature.
Use semantic prefixes and hyphen-separated names. For example:
git checkout -b feat/HNG-2145-add-user-login-functionality
git checkout -b fix/HNG-2145-resolve-issue-with-stock-deletion
git checkout -b chore/HNG-2145-update-dependencies
git checkout -b docs/HNG-2145-update-README.md
When you're done making changes, add them to the branch.
git add .
Follow this Conventional Commits standard to commit your changes
type: description
Examples:
git commit -m feat:HNG-2145-add-user-login-functionality
git commit -m fix:HNG-2145-resolve-issue-with-stock-deletion
git commit -m chore:HNG-2145-update-dependencies
git commit -m docs:HNG-2145-update-README.md
Final checklist
Branch names and Commit messages use prefixes like:
✅ feat/ - (New feature)
✅ fix/ - (Bug fix)
✅ chore/ - (Maintenance task)
✅ docs/ - (Documentation changes)
Push your branch to your forked repository:
git push origin feat/HNG-2145-your-feature-name
-
Go to your forked repository on GitHub.
-
Click Compare & Pull Request for your newly pushed branch.
-
Add a title and description for your PR. A good pr should have:
- Title - The default PR message is the commit message which describes the changes. You can edit it as needed.
- PR Description - A good PR description should clearly explain what you did, why you did it, and how you tested it. Here’s an example:
#### Follow this template:
## What?
I've added support for user authentication to implement the login feature as per the Figma design. This includes the login page, authentication logic, and API integration.
## Why?
These changes complete the user login experience, allowing users to securely log in and manage their stock. For more background, see ticket #HNG-2145.
## How?
This includes a new login page built with Next.js and Tailwind CSS, along with API integration for authentication. I used shadcn/ui for reusable components like buttons and forms.
## Testing?
I've tested the login functionality with valid and invalid credentials. I also verified that the UI matches the Figma design.
## Screenshots (optional)
Screenshot/s of the login page.
To keep your forked repository up-to-date with the main HNG repository, follow these steps:
- Add the HNG Repository as an Upstream
git remote add upstream https://github.com/hngprojects/shopdesk-fe.git
- Verify the remote was added
git remote -v
- Fetch and Merge Changes Fetch the latest changes from the HNG repository:
git fetch upstream
- Switch to your main branch:
git checkout main
- Merge the changes from the HNG repository:
git merge upstream/main
- Push the updated main branch to your forked repository:
git push origin main
- Since we are working on a feature branch, rebase it with the updated main branch:
git checkout feat/HNG-2145-your-feature-name
git rebase main