OnyxStore π
A professional, darkβthemed eβcommerce storefront built with Nuxt 3 & Tailwind CSS.
π SonarCloud Code Analysis
π Overview
This project is a modular, responsive, and accessible eβcommerce application featuring:
Authentication: login, registration & logout flows
Product catalog: listing and individual product pages
Stripe checkout: integrated PaymentElement for secure oneβtime purchases
Dark theme: elegant palette inspired by modern UI trends
User feedback: smooth loading states, error/success messages, and microβinteractions
Designed to showcase serious craftsmanship and a highβquality user experience.
β¨ Key Features
Authentication Pages:
/login
,/register
,/logout
Product Browsing:
/products
,/products/[id]
Checkout Flow:
/checkout
(payment form),/payment-success
,/error
Payment Integration: Stripe PaymentElement, secure clientSecret fetch
Responsive Design: mobileβfirst, fluid grid layouts
Component Library: reusable UI components with clear API
Dark Mode: consistent dark palette with accent colors
π Getting Started
Clone the repository
git clone https://github.com/YourUsername/your-ecommerce-app.git cd your-ecommerce-app
Install dependencies
pnpm install
Configure environment
Copy
.env.example
to.env
Set
NUXT_PUBLIC_STRIPE_PK
,STRIPE_SECRET_KEY
,STRIPE_WEBHOOK_SECRET
, etc.
Run the development server
pnpm dev
Build & Preview
pnpm build pnpm run preview
ποΈ Folder Structure
βββ assets/
β βββ css/main.css # Global styles (Tailwind base)
βββ components/ # Reusable Vue components
β βββ AppHeader.vue
β βββ AppFooter.vue
β βββ ProductCard.vue
β βββ LoadingSpinner.vue
βββ layouts/
β βββ default.vue # Main layout with Header/Footer
βββ pages/
β βββ index.vue # Home / product listing
β βββ login.vue
β βββ register.vue
β βββ logout.vue
β βββ products/ # Product pages
β β βββ index.vue
β β βββ [id].vue
β βββ checkout.vue
β βββ payment-success.vue
β βββ error.vue
βββ server/api/ # Nitro server routes
β βββ stripe/ # Stripe integration endpoints
β β βββ paymentintent.post.ts
β β βββ webhook.post.ts
β βββ auth/ # Authentication API (to be implemented)
βββ utils/ # Shared utilities (e.g. Zod schemas)
βββ tailwind.config.js
βββ nuxt.config.ts
βββ README.md # This file
π Pages & Responsibilities
/login
Display login form and handle authentication submission
/register
Display registration form and handle new user signup
/logout
Execute logout logic and redirect to home
/products
List all products with pagination/filtering UI
/products/[id]
Show detailed product information and βAdd to Cartβ button
/checkout
Render Stripe PaymentElement and initiate payment flow
/payment-success
Display confirmation and order summary after successful payment
/error
Show error message and recovery actions if payment fails or is canceled
π¦ Tech Stack
Framework: Nuxt 3
Styling: Tailwind CSS + Headless UI
Payment: Stripe PaymentElement
API: Nuxt Nitro server routes, Zod for validation
State Management: Nuxt composables (e.g.
useCart
)Icons: Heroicons, Lucide
βοΈ Usage
This project provides only the UI. You should implement the following backend logic yourself:
Authentication (login/register/logout)
Product Fetching and Cart Management
Serverβside API for Stripe (PaymentIntent, Webhooks)
Once these are in place, the UI will seamlessly integrate with your business logic.
π οΈ Commit Guidelines
This project comes pre-configured with the following tools to enforce commit conventions and code quality:
husky
commitizen (
^4.3.1
)cz-git (
^1.12.0
)eslint-plugin-useFormat (
^1.0.1
)eslint-plugin-perfectionist (see
package.json
for exact version)
To create a properly formatted commit (with Husky running your lint/useFormat hooks and Commitizen guiding your message), simply run:
pnpm commit
π‘οΈ ESLint Configuration
This project uses a flat ESLint config powered by Antfuβs preset (@antfu/eslint-config
). All rules are declared in your eslint.config.js
(flat-config) useFormat, combined with Nuxt via the withNuxt()
helper.
π€ Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/YourFeature
)Commit your changes (
git commit -m "feat: Add ..."
)Push to the branch (
git push origin feature/YourFeature
)Open a Pull Request
Please follow the existing code style and write descriptive commit messages.
π License
This project is licensed under the MIT License.
π Codes documentation
π§ Contact
Built with π by Jordach MAKAYA. For questions or feedback, reach out at thejordach@gmail.com.
Last updated