This repository contains the final project of GDGoC Unsri, developed by Team Green. The project is a marketplace website for thrifting (second-hand items), built with collaboration between Frontend and Backend development.
- M. Rabyndra Janitra Binello
- Steven
Thriftoria is a comprehensive e-commerce platform designed specifically for the thrifting market (second-hand goods). The platform supports three distinct user roles—Buyer, Seller, and Admin—each with tailored features and dashboards to create a complete marketplace ecosystem.
- 🛍️ Multi-role System: Buyers can shop, Sellers can manage shops and products, Admins oversee the platform
- 🔐 Secure Authentication: JWT-based authentication with role-based access control
- 📦 Complete Order Flow: From cart to checkout, payment verification, to delivery tracking
- 🏪 Shop Management: Sellers can register shops and manage their inventory
- 📱 Responsive Design: Modern UI built with React and Tailwind CSS
- Go (Golang) - Core programming language
- Fiber - Web framework
- Gorm - ORM for database interactions
- MySQL - Database
- JWT - Authentication
- React - UI library
- Vite - Build tool
- Tailwind CSS - Styling
- Shadcn UI - Component library
- React Router - Routing
- React Hook Form & Zod - Form handling and validation
Before you begin, ensure you have the following installed on your system:
- Go (version 1.19 or higher) - Download
- Node.js (version 16 or higher) and npm - Download
- MySQL (version 8.0 or higher) - Download
- Git - Download
- MySQL Workbench or any MySQL client for database management
- Postman or similar tool for API testing
git clone https://github.com/ElloRabyndra/Team_Green_Thriftoria.git
cd Team_Green_ThriftoriaOpen your MySQL client (MySQL Workbench, command line, or any other tool) and create a new database:
CREATE DATABASE thriftoria_db;The SQL file (finprobackend.sql) is provided in the root directory:
mysql -u your_username -p thriftoria_db < finprobackend.sqlOr, if you prefer to use MySQL Workbench:
- Open MySQL Workbench
- Connect to your MySQL server
- Select Server → Data Import
- Choose Import from Self-Contained File
- Select the
finprobackend.sqlfile - Choose
thriftoria_dbas the target schema - Click Start Import
Check that all tables have been created successfully:
USE thriftoria_db;
SHOW TABLES;You should see tables like: users, shops, products, carts, orders, order_items, etc.
cd backendgo mod tidyCreate a .env file in the backend directory:
cp .env.example .envOr create a new .env file with the following content:
# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_mysql_username
DB_PASSWORD=your_mysql_password
DB_NAME=thriftoria_db
# Server Configuration
BASE_URL=http://127.0.0.1:3000
# JWT Secret (use a strong random string)
JWT_SECRET=your_very_secure_secret_key_hereImportant: Replace the placeholder values with your actual MySQL credentials and generate a strong JWT secret.
Test that the backend can connect to the database:
go run main.goIf successful, you should see a message indicating the server is running on http://localhost:3000.
Open a new terminal window/tab and navigate to the frontend directory:
cd frontendnpm installOr if you use yarn:
yarn installOr if you use pnpm:
pnpm installcreate a .env file in the frontend directory:
VITE_API_URL=http://localhost:3000/api/v1Start the development server:
npm run devThe application should now be accessible at http://localhost:5173.
In the backend directory:
go run main.goThe API will be available at http://localhost:3000/api/v1
In the frontend directory:
npm run devThe web application will be available at http://localhost:5173
To explore different features based on user roles, you can use these pre-configured accounts:
- Email:
admin@gmail.com - Password:
123456 - Access: Full platform management (user management, shop approvals)
- Email:
ello@gmail.com - Password:
123456 - Access: Shop management, product listings, sales tracking, and buyer features
You can register a new buyer account through the registration pages
- Description: Landing page displaying all available products from various shops
- Features:
- View all products in a grid/card layout
- Filter products by category (Fashion or Others)
- Search products by name
- View product images, prices, and basic details
- Click on products to view detailed information
- How to Use:
- Browse products on the home page
- Use the category filter buttons to narrow down results
- Use the search bar to find specific items
- Click on any product card to see full details
- Description: Detailed view of a single product
- Features:
- View high-resolution product images
- See complete product description, price, stock, and category
- View product label/condition
- See which shop is selling the product
- Add product to cart (requires login)
- How to Use:
- Click "Add to Cart" button to add the product
- Click on the shop name to view the shop's profile and other products
- Description: Public profile page for a specific shop
- Features:
- View shop information (name, description, QRIS payment)
- See all products offered by this shop
- How to Use:
- Browse all products from this specific shop
- Click on any product to view details
- Description: User authentication pages
- Features:
- Register new account (creates a Buyer account by default)
- Login with email and password
- Secure JWT-based authentication
- How to Use:
- New users: Click "Register" and fill in username, email, and password
- Existing users: Enter email and password to login
- After login, you'll be redirected to the home page with access to user features
- Description: View and manage items added to cart
- Features:
- View all cart items grouped by shop
- Update quantities for each item
- Remove items from cart
- Select multiple items from the same shop for checkout
- See total price for selected items
- How to Use:
- Check the boxes next to items you want to purchase (must be from the same shop)
- Adjust quantities using the +/- buttons
- Remove unwanted items with the delete button
- Click "Checkout" to proceed to payment
- Description: Complete order placement with payment proof
- Features:
- Review selected items and total price
- Enter recipient information (name, phone, address)
- Upload proof of payment (QRIS payment to shop)
- Add optional order notes
- How to Use:
- Fill in recipient details (can be different from your profile)
- Scan the shop's QRIS code and make payment
- Upload screenshot/photo of payment proof (max 1MB)
- Add any special instructions in the notes field
- Click "Place Order" to submit
- Description: View all active orders
- Features:
- See list of ongoing orders
- View order status (awaiting payment verification, prepared, shipped, delivered)
- Click on orders to view details
- Track order progress
- How to Use:
- Browse your active orders
- Click on any order to see detailed tracking information
- Wait for seller to verify payment and update shipping status
- Description: Detailed tracking for a specific order
- Features:
- View complete order information (items, quantities, prices)
- See recipient details and shipping address
- Check current order status
- View payment proof that was uploaded
- Request order cancellation (if needed)
- How to Use:
- Monitor order status updates
- If needed, click "Request Cancellation" to cancel the order
- Wait for seller's response on cancellation request
- Description: Archive of completed and cancelled orders
- Features:
- View all past orders
- Filter by completed or cancelled status
- Review order details
- How to Use:
- Browse your order history
- Click on any order to see full details
- Description: Apply to become a seller by registering a shop
- Features:
- Fill in shop details (name, description)
- Upload QRIS payment code for receiving payments
- Submit application for admin approval
- How to Use:
- Fill in all shop information
- Upload your QRIS code image (this is how buyers will pay you)
- Submit application
- Wait for admin approval (status will be "Pending")
- Once approved, your role changes to Seller
- Description: Manage your account information
- Features:
- View current profile details
- Update username, email, address, phone number
- Change password
- Upload/update profile picture
- How to Use:
- Click on any field to edit
- Upload a new profile picture (max 1MB, .png/.jpg/.jpeg)
- To change password, enter new password
- Click "Save Changes" to update
Note: All Buyer features are also available to Sellers (shopping, cart, orders, etc.)
- Description: Manage your shop profile
- Features:
- View current shop information
- Edit shop name and description
- Update QRIS payment code
- View shop status (pending/approved)
- How to Use:
- Click "Edit Shop" to modify information
- Update details as needed
- Save changes
- Description: Inventory management page
- Features:
- View all products listed in your shop
- See product status (in stock, out of stock)
- Add new products
- Edit existing products
- Delete products
- How to Use:
- Click "Add Product" to list a new item
- Fill in product details (name, category, price, stock, image, description)
- Click on any product to edit or delete
- Products must have stock > 0 to be visible to buyers
- Description: Update product information
- Features:
- Modify product name, category, price, stock
- Update product image
- Change description and label
- How to Use:
- Update any fields you want to change
- Upload a new image if needed (max 1MB)
- Click "Update Product" to save changes
- Description: View all orders received by your shop
- Features:
- See incoming orders from buyers
- View order status and payment status
- Click on orders to process them
- Track sales performance
- How to Use:
- Review new orders regularly
- Click on orders to verify payment and update status
- Process orders by updating shipping status
- Description: Process and manage a specific order
- Features:
- View complete order details and buyer information
- See proof of payment uploaded by buyer
- Accept or reject payment
- Update order status (prepared, shipped, delivered)
- Handle cancellation requests
- How to Use:
- Verify Payment: Review the payment proof image
- Click "Accept Payment" if valid
- Click "Reject Payment" if invalid/suspicious
- Update Shipping Status:
- Mark as "Prepared" when you're packing the items
- Mark as "Shipped" when you've sent the package
- Mark as "Delivered" when buyer confirms receipt
- Handle Cancellations:
- If buyer requests cancellation, review the request
- Accept or reject based on your shop policy
- Verify Payment: Review the payment proof image
Note: Admins have access to all platform management features
- Description: Manage all registered users
- Features:
- View list of all users (Buyers and Sellers)
- See user details (username, email, role)
- Search users by name or email
- View detailed user information
- How to Use:
- Browse the list of all registered users
- Use search to find specific users
- Click on any user to view detailed profile
- Description: View detailed information about a specific user
- Features:
- See complete user profile
- View user's role (Buyer/Seller)
- See registration date and activity
- How to Use:
- Review user information
- Monitor user activity and compliance
- Description: Manage all approved/active shops
- Features:
- View list of all approved shops
- See shop details (name, owner, status)
- Access shop profiles
- Monitor shop activity
- How to Use:
- Browse all active shops on the platform
- Click on any shop to view its profile and products
- Monitor shop compliance and activity
- Description: Review and process shop registration applications
- Features:
- View all pending shop applications
- See shop details and QRIS information
- Approve or reject applications
- Review applicant information
- How to Use:
- Review Application:
- Check shop name and description
- Verify QRIS code image is valid
- Review applicant's profile
- Make Decision:
- Click "Approve" to accept the shop (user becomes a Seller)
- Click "Reject" to decline the application
- Result:
- Approved: Shop becomes active, user role changes to Seller
- Rejected: Application is removed, user remains a Buyer
- Review Application:
- All passwords are hashed using bcrypt before storage
- JWT tokens are used for authentication and stored in HTTP-only cookies
- File uploads are validated for type and size
- Role-based access control prevents unauthorized access to features
- Payment proofs and QRIS codes are securely stored on the server
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Review the backend and frontend README files for detailed API documentation
- Contact the development team:
- M. Rabyndra Janitra Binello
- Steven
This project is developed as a final project for GDGoC Unsri by Team Green.