Skip to content

Aybavs/trustvote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrustVote - Blockchain Voting System

Blockchain tabanlı güvenli ve şeffaf seçim sistemi.

Teknoloji Stack

Backend

  • Framework: Flask 3.0 (Python)
  • Database: PostgreSQL + SQLAlchemy
  • Cache: Redis
  • Message Queue: RabbitMQ + Celery
  • Blockchain: Ethereum (Sepolia testnet)
  • ML: scikit-learn (Anomaly Detection)

Frontend

  • Framework: React 19 + TypeScript
  • Build Tool: Vite
  • Styling: TailwindCSS 4
  • State: React Query
  • Routing: React Router v7

Hızlı Başlangıç

Docker ile (Önerilen)

# 1. Repo'yu klonla
git clone https://github.com/Aybavs/trustvote.git
cd trustvote

# 2. .env dosyasını oluştur
cp .env.example .env

# 3. Docker ile başlat
docker-compose up -d

# Servisler başladıktan sonra:
# - Frontend: http://localhost:5173
# - Backend API: http://localhost:5000
# - Swagger UI: http://localhost:5000/api/v1/docs
# - RabbitMQ UI: http://localhost:15672

Manuel Kurulum

Backend

cd backend
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
flask db upgrade
python scripts/seed_db.py
python app.py

Frontend

cd frontend
npm install
npm run dev

Proje Yapısı

trustvote/
├── backend/                 # Flask API
│   ├── app/                 # Uygulama kodu
│   │   ├── api/v1/          # API endpoints
│   │   ├── models/          # Database models
│   │   ├── services/        # Business logic
│   │   ├── schemas/         # Validation schemas
│   │   ├── middleware/      # Auth, validators
│   │   ├── ml/              # Machine learning
│   │   └── tasks/           # Celery tasks
│   ├── blockchain/          # Smart contracts
│   ├── config/              # Configuration
│   ├── migrations/          # Database migrations
│   ├── scripts/             # Utility scripts
│   └── Dockerfile
├── frontend/                # React App
│   ├── src/
│   │   ├── core/            # API, repositories
│   │   ├── pages/           # Page components
│   │   └── shared/          # Shared components
│   └── Dockerfile
├── docker-compose.yml       # All services
├── .env.example             # Environment template
└── README.md

Docker Servisleri

Servis Port Açıklama
frontend 5173 React dev server
api 5000 Flask API
db 5432 PostgreSQL
redis 6379 Cache
rabbitmq 5672, 15672 Message broker
celery_worker - Background tasks
celery_beat - Scheduled tasks

Test Hesapları

Rol Email Şifre
Super Admin admin@trustvote.com Admin123!
Voter voter@example.com Voter123!

Geliştirme

Backend

cd backend
flask db migrate -m "Description"  # Yeni migration
flask db upgrade                    # Migration uygula
pytest                              # Testleri çalıştır

Frontend

cd frontend
npm run dev      # Development server
npm run build    # Production build
npm run lint     # Lint check

Lisans

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors