Project Description: Loyiha maqsadi: Olimpiada o'yinlari uchun real vaqtda yangilanadigan medallar reytingi va musobaqa jarayonlarini live text shaklida ko'rsatadigan tizim yaratish. musobaqa jarayonlarini live text shaklida degani quyidagicha: Masalan Dzyudo musoboqasi bo’layotgan bo’lsa, olingan ochko, sariq kartochka yoki boshqalarni kuzatib turish imkoniyati. Yoki, futbol musobaqasida kiritilgan gol, kartochkalar, o’yinchi almashishi va hakozo kabi ma’lumotlar.
- Medal rating
- Live text streaming
- Microservices
- communication between services through gRPC
- Protocol Buffers for data serialization
- Databases:
- PostgreSQL (for basic data)
- MongoDB (for live streaming data)
- Redis (for caching)
- Gin framework (for REST API)
- JWT authentication
- Casbin (for roles and authorization)
- Kafka or RabbitMQ (for messaging)
- Docker (for containerization)
- API Gateway
- Swagger (for API documentation)
- Unit testing
- Database migration
- Submodule for protos
- API endpoints
- Data model
- Security
- Testing
- Documentation
-
Initialize a git repository and clone the project:
git init git clone https://gitlab.com/olympy1
-
Create a database named
olympy
on port5432
. -
Update the
.env
file with the appropriate configuration.DB_HOST=localhost DB_USER=postgres DB_NAME=olympy DB_PASSWORD=pass DB_PORT=5432 LOGPATH=logs/info.log
-
Use the following Makefile commands to manage the database migrations and set up the project:
# Set the database URL exp: export DBURL="postgres://postgres:1234@localhost:5432/olympy?sslmode=disable'" # Run migrations mig-up: migrate -path migrations -database ${DBURL} -verbose up # Rollback migrations mig-down: migrate -path migrations -database ${DBURL} -verbose down # Create a new migration mig-create: migrate create -ext sql -dir migrations -seq create_table # Create an insert migration mig-insert: migrate create -ext sql -dir migrations -seq insert_table # Generate Swagger documentation swag: swag init -g api/api.go -o api/docs # Clean up migrations (commented out by default) # mig-delete: # rm -r db/migrations
-
Set the environment variable and run the project:
make exp make mig-up go run main.go
-
Open the following URL to access the Swagger documentation:
http://localhost:8088/swagger/index.html#/
Loyiha qo'shimcha maqsadlari:
-
Statistik tahlillar: Musobaqa davomida va yakunida sportchilar va jamoalar haqidagi keng qamrovli statistik ma'lumotlarni taqdim etish. Bu jamoalar va sportchilar o'rtasidagi solishtirishlarni, individual natijalarni va rekordlarni ko'rsatishni o'z ichiga oladi.
-
Foydalanuvchi tajribasini oshirish: Foydalanuvchilar uchun qulay va intuitiv interfeys yaratish, u orqali foydalanuvchilar osongina kerakli ma'lumotlarni topishi va kuzatishi mumkin. Shuningdek,yangilanishlarni real vaqtda olish imkoniyati.
-
Foydalanuvchilar o'rtasidagi muloqot: Foydalanuvchilar o'zaro musobaqalar haqida fikr almashishi va sharh qoldirishi mumkin bo'lgan forum yoki chat funksiyalarini borligi.
-
Xavfsizlik va maxfiylik: Foydalanuvchilarning shaxsiy ma'lumotlarini himoya qilish va tizimning xavfsizligini ta'minlash, shu jumladan kirish nazorati va ma'lumotlarni shifrlash.
-
Ma'lumotlar omborini boshqarish: Katta hajmdagi ma'lumotlarni samarali boshqarish va saqlash, shu jumladan arxivlash va qayta ishlash.
Loyiha quyidagi texnologiyalar yordamida amalga oshiriladi:
- Backend: Golang
- Ma'lumotlar bazasi: PostgreSQL yoki MongoDB
- Real vaqt yangilanishi: WebSocket
- Autentifikatsiya va avtorizatsiya: JWT
- Scheduling: github.com/go-co-op/gocron
- Swagger: github.com/swaggo/swag
- Database:
- Environment Variables: github.com/joho/godotenv
- API Framework: github.com/gin-gonic/gin
- Migrations: github.com/golang-migrate/migrate
- Mubina Bahodirova
- Feruza Mirjalilova
- Javohir Xasanov