Pegasus Shop
This project is intended as an excercise
It should have this basic functionalities:
AI generated slop follows bellow (dont take it too seriously, it could contain errors):
alsception@proton.me 11/7/2025
============================================================================================
A comprehensive e-commerce web application built for modern online shopping experiences.
Regular shoppers who can browse, purchase, and review products.
Customer Journey:
Administrative users with elevated permissions to manage the shop.
Admin Workflow:
Pegasus Shop follows a vertical slice architecture that promotes maintainability and scalability:
Each business capability is organized as a self-contained feature:
This architecture ensures that each feature contains its own:
Clone the repository
git clone https://github.com/asception/pegasus-shop.git
cd pegasus-shop
Configure Supabase database
application.properties
with your Supabase credentials:spring.datasource.url=jdbc:postgresql://[YOUR-SUPABASE-URL]
spring.datasource.username=[YOUR-DB-USERNAME]
spring.datasource.password=[YOUR-DB-PASSWORD]
supabase.url=[YOUR-SUPABASE-URL]
supabase.key=[YOUR-SUPABASE-ANON-KEY]
Configure Unsplash API
application.properties
:unsplash.api.key=[YOUR-UNSPLASH-ACCESS-KEY]
Build the application
# Install frontend dependencies
npm install
# Build frontend (Svelte + Tailwind CSS + DaisyUI)
npm run build:frontend
# Build Spring Boot application
mvn clean package
Run the application
Option 1: Using Docker (Recommended)
# Build and run with Docker Compose
docker-compose up --build
# Or run in detached mode
docker-compose up -d
Option 2: Local Development
# Using Maven
mvn spring-boot:run
# Or using the built JAR
java -jar target/pegasus-shop-1.0.jar
Access the application
http://localhost:8080
http://localhost:8080/admin
http://localhost:8080/swagger-ui.html
The application is fully containerized for easy deployment:
# Build Docker image
docker build -t pegasus-shop .
# Run with Docker
docker run -p 8080:8080 pegasus-shop
# Or use Docker Compose for full stack
docker-compose up
Docker Compose includes:
The project includes convenient scripts for deployment:
# Build and deploy to production
./scripts/deploy.sh
# Start application in production mode
./scripts/start.sh
# Build frontend assets (Svelte + Tailwind + DaisyUI)
./scripts/build-frontend.sh
# Docker deployment
./scripts/docker-deploy.sh
The frontend is built with Svelte and styled using Tailwind CSS with DaisyUI components for a modern, responsive design.
# Install frontend dependencies
npm install
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
src/
āāā components/ # Reusable Svelte components
āāā routes/ # Page components and routing
āāā lib/ # Utilities and shared logic
āāā stores/ # Svelte stores for state management
āāā app.css # Global styles and Tailwind imports
Currently supporting:
Additional payment methods (credit cards, PayPal, etc.) will be added in future updates.
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginPOST /api/auth/logout
- User logoutGET /api/products
- List all productsGET /api/products/:id
- Get specific productPOST /api/products
- Create product (admin only)PUT /api/products/:id
- Update product (admin only)DELETE /api/products/:id
- Delete product (admin only)POST /api/orders
- Create new orderGET /api/orders
- Get user ordersGET /api/orders/:id
- Get specific orderPUT /api/orders/:id/status
- Update order status (admin only)GET /api/cart
- Get user's cartPOST /api/cart/add
- Add item to cartPUT /api/cart/update
- Update cart item quantityDELETE /api/cart/remove
- Remove item from cartGET /api/wishlist
- Get user's wishlistPOST /api/wishlist/add
- Add item to wishlistDELETE /api/wishlist/remove
- Remove item from wishlistgit checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)Please use the GitHub Issues section to report bugs or request new features.
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
Pegasus Shop - Soaring above the competition in e-commerce solutions.