Nov 2024 - Dec 2024
Fullstack Developer
E-commerce Web Application
This fullstack e-commerce platform was developed as a final project for a framework programming class, leveraging Next.js for the frontend and Golang for the backend. The platform allows users to register, log in, browse products, manage their shopping carts, and place orders. The backend supports complex operations such as user authentication, product management, and order processing with secure API endpoints.
Frontend: The frontend is built using Next.js, providing a dynamic, SEO-friendly single-page application (SPA) experience with server-side rendering (SSR) for optimal performance. The frontend communicates with the backend through RESTful API calls to perform actions such as logging in, adding products to the cart, and placing orders.
Backend: The backend is developed in Golang, utilizing GORM for ORM-based interaction with the PostgreSQL database. The backend handles user authentication (with hashed passwords), product CRUD operations, cart management, and order processing.
Database Design: The platform uses PostgreSQL to manage entities like User, Product, Cart, Order, and OrderItem, with relationships defined for efficient data handling. The data models include:
Auth:
POST /register
: Register a new user.POST /login
: Login and obtain a token for authentication.GET /me
: Retrieve current user data.DELETE /user/:id
: Delete a user by ID.Product:
GET /products
: Get all products.GET /product/:id
: Get a specific product by ID.POST /product
: Add a new product.PUT /product/:id
: Edit product details.DELETE /product/:id
: Delete a product by ID.Cart:
POST /cart
: Add a product to the cart.GET /cart
: Get all products in the user's cart.PUT /cart/:id
: Update the quantity of an item in the cart.Order:
POST /order
: Create a new order from the cart.GET /orders
: Get all orders for the current user.PUT /order/:id
: Update order status (e.g., from 'pending' to 'shipped').The project was developed in an agile manner, starting with the backend models and APIs. Once the core API was ready, the frontend was developed using Next.js, focusing on providing a dynamic and interactive user experience. Afterward, both the frontend and backend were thoroughly tested to ensure seamless integration and smooth functionality.
Integrating a smooth frontend experience with a robust Golang backend while managing complex relationships between users, products, carts, and orders.
Developed a clean and intuitive frontend with Next.js, integrated with a Golang backend that efficiently handles user authentication, product management, and order processing. Implemented secure data storage and API endpoints for seamless communication.