Skip to content

gaukem/GAMeta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GA Meta - Giveaway Management System

📋 Tổng Quan

GA Meta là hệ thống quản lý giveaway tự động cho các hoạt động trao thưởng trên Facebook. Hệ thống giúp đơn giản hóa quy trình từ thu thập dữ liệu bình luận, quản lý thông tin người tham gia, đến quay thưởng và thông báo kết quả.

🏗️ Kiến Trúc Hệ Thống

Hệ thống được xây dựng theo mô hình Clean Architecture với Layered Pattern:

GAMeta/
├── src/
│   ├── GAMeta.API/                 # ASP.NET Core Web API
│   ├── GAMeta.Domain/              # Domain Models & Entities
│   ├── GAMeta.Data/                # Data Access Layer (EF Core)
│   ├── GAMeta.Services.Facebook/   # Facebook Graph API Integration
│   ├── GAMeta.Services.Google/     # Google Sheets/Forms Integration
│   └── GAMeta.Web/                 # React Frontend (TypeScript)
├── proposal.md                     # Detailed Solution Proposal
├── Dockerfile                      # Docker configuration
├── docker-compose.yml              # Multi-container setup
└── README.md                       # This file

🚀 Chức Năng Chính

1. Thu Thập Bình Luận Facebook

  • Kết nối với Facebook Graph API
  • Lọc bình luận theo tiêu chí (từ khóa, hashtag, emoji)
  • Loại trừ duplicate và admin
  • Đồng bộ với Google Sheets

2. Quản Lý Campaign

  • Tạo/sửa/xóa chiến dịch
  • Cấu hình tiêu chí lọc
  • Liên kết với Facebook post và Google Form
  • Quản lý thời gian và sponsor

3. Quản Lý Người Tham Gia

  • Import từ Google Forms
  • Đối chiếu với bình luận Facebook
  • Xác thực thông tin
  • Export danh sách

4. Hệ Thống Quay Thưởng

  • Thuật toán ngẫu nhiên công bằng (Cryptographic RNG)
  • Hỗ trợ nhiều vòng quay
  • Verification hash
  • Animation và visual effects

5. Quản Lý Giải Thưởng

  • Tạo/quản lý prizes
  • Tracking số lượng và trạng thái
  • Upload hình ảnh
  • Phân loại giải thưởng

6. Quản Lý Người Trúng Thưởng

  • Danh sách winners
  • Tracking giao hàng
  • Export cho sponsor
  • Notification system

7. Tạo Bài Thông Báo

  • Template engine
  • Auto-fill thông tin
  • Preview và publish
  • Post lên Facebook tự động

🛠️ Tech Stack

Backend

  • Framework: ASP.NET Core 8.0
  • Language: C# 12
  • ORM: Entity Framework Core 8
  • Database: SQL Server / PostgreSQL
  • Cache: Redis
  • Background Jobs: Hangfire

Frontend

  • Framework: React 18 + TypeScript
  • UI: Material-UI / Ant Design
  • State: Redux Toolkit
  • HTTP: Axios

Integration

  • Facebook Graph API v18.0
  • Google Sheets API v4
  • Google Forms API

📦 Cài Đặt

Prerequisites

  • .NET 8.0 SDK
  • Node.js 18+
  • SQL Server / PostgreSQL
  • Redis (optional)
  • Docker & Docker Compose (optional)

Development Setup

  1. Clone repository
git clone <repository-url>
cd GAMeta
  1. Backend Setup
cd src/GAMeta.API
dotnet restore
dotnet build
  1. Database Setup
dotnet ef database update
  1. Frontend Setup
cd src/GAMeta.Web
npm install
npm run dev
  1. Run Application
# Terminal 1: Backend
cd src/GAMeta.API
dotnet run

# Terminal 2: Frontend
cd src/GAMeta.Web
npm run dev

Docker Setup

docker-compose up -d

⚙️ Configuration

appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=GAMeta;..."
  },
  "Facebook": {
    "AppId": "your-app-id",
    "AppSecret": "your-app-secret",
    "AccessToken": "your-access-token"
  },
  "Google": {
    "CredentialsPath": "path-to-service-account.json"
  }
}

📚 API Documentation

Sau khi chạy API, truy cập Swagger UI tại:

https://localhost:5001/swagger

🧪 Testing

# Run all tests
dotnet test

# Run with coverage
dotnet test /p:CollectCoverage=true

📈 Deployment

Azure

az webapp up --name gameta-api --resource-group gameta-rg

Docker

docker build -t gameta-api .
docker run -p 5000:5000 gameta-api

🔒 Security

  • JWT Authentication
  • Role-based Access Control (RBAC)
  • Data encryption (at rest & in transit)
  • Rate limiting
  • CORS configuration

📊 Monitoring

  • Application Insights
  • Serilog structured logging
  • Health checks endpoint: /health

📞 Support

For support and detailed proposal, see proposal.md


Version: 1.0.0
Last Updated: 2024
Status: In Development

About

Giveaways for community facebook.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors