Welcome to OrbitStack! This is a modern, Next.js-based e-commerce platform built with Tailwind CSS, Prisma, and Zustand.
-
Install Dependencies
npm install
-
Set up Environment Variables The project connects to a shared testing database. Simply copy the example environment file:
cp .env.example .env
-
Run the Development Server
npm run dev
A user reported an issue where applying a free shipping discount code to a Pro account results in a negative discount calculation (instead of ) for the shipping cost.
- The pricing computation logic was fixed so that shipping is calculated correctly when multiple shipping discounts/free tiers stack.
The /dashboard page is loading extremely slowly for users who have a large order history.
- The performance bottleneck when loading the order history was identified.
- The data fetching was optimized so the dashboard loads quickly regardless of how many orders the user has.
A "Duplicate Order" button was added to the past orders displayed on the dashboard.
- Clicking the button adds the same items from the past order directly into the user's cart (provided they are still in stock).
- The API endpoint and the client-side logic to update the cart store was built.
- I added a back button and logout button feature
- Logout —
components/dashboard/LogoutButton.tsxadded to the Order History page. - Back arrow —
components/layout/BackButton.tsxrendered in the root layout on the Orders and Shop pages.
- I also added a Clear Cart feature after every logout in the dashboard
- Cart cleared —
actions/cart.tsmodified to clear the cart after logout. - Confirmation —
components/dashboard/LogoutButton.tsxadded a confirmation dialog before logout.