Skip to content

Danielk84/generic-shop-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

168 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic Shop Sample 🛍️

Project Overview

A Comprehensive Go-based E-Commerce Platform

🚀 Project Status

Disclaimer: This project is a learning playground and not yet production-ready. It's designed for educational purposes and
experimentation features

Core Functionalities

👤 User Management

  • Authentication
  • Profile management
  • Role-based access control

📦 Product Catalog

  • CRUD operations
  • Category hierarchies
  • Flexible product management

🛒 Ordering System

  • Complete order workflow

💳 Payment Integration

  • Zarin-Pal payment gateway

📧 Communication Services

  • Email verifier

💬 Community Interaction

  • Product commenting system
  • User reviews

🛠 Technology Stack

  • Language Go (Golang) 1.21+

  • Web framework Gin

  • CLI management Cobra

  • Row sql and database postgresSQL

  • Caching system redis

  • Payment gateway Zarin-Pal v4

🚀 Quick Start

Prerequisites

Go 1.24+
Docker (optional)
Zarin-Pal Merchant Account

Local Development Setup

  1. Clone the Repository
git clone https://github.com/yourusername/generic-shop-sample.git
cd generic-shop-sample
  1. Configuration
# Copy environment template
cp .env.example .env

# Edit .env file with your specific configurations
# Set database, payment gateway, and email service credentials
nano .env
  1. Environment Variables
# Set precise path to your .env file
export DOTENV_PATH=~/exact/path/to/.env
  1. Build & Run Local Execution
# Build the application
go build .

# Start the server
./generic-shop-sample serve

# Create admin user
./generic-shop-sample new-admin -u admin -p securePassword

Docker Deployment

# Build and start services
docker compose build
docker compose up -d

# View logs
docker compose logs -f

🔐 Security Features

  • secure password hashing base
  • JWT Authentication
  • Role-Based Access Control

🧪 Testing

Run Tests

## Unit Tests
go test ./... -v

Contact

About

simple shop base on Go

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages