AY.com is a modern social media platform inspired by X (Twitter), built with microservices architecture using cutting-edge technologies.
Auth Service (Port: 50051)
Community Service (Port: 50055)
Chat Service (Port: 50052)
Thread Service (Port: 50054)
Category Service (Port: 50053)
AI Service (Port: 5001)
API Gateway (Port: 8080)
Make sure you have installed:
git clone https://github.com/yourusername/AY.com.git
cd AY.com
Create .env file in backend/ folder:
# Database
POSTGRES_USER=ay_user
POSTGRES_PASSWORD=ay_password
POSTGRES_DB=ay_auth_db
# JWT
JWT_SECRET=your-super-secret-jwt-key
# Services
AUTH_SERVICE_URL=auth-service:50051
CATEGORY_SERVICE_URL=category-service:50053
CHAT_SERVICE_URL=chat-service:50052
THREAD_SERVICE_URL=thread-service:50054
COMMUNITY_SERVICE_URL=community-service:50055
AI_SERVICE_URL=http://ai-service:5000
Create .env file in frontend/ folder:
VITE_API_URL=http://localhost:8080
VITE_WS_URL=ws://localhost:8080
cd backend/ai-service
# Model is already available in model/ folder
# If you need to retrain, run the notebook:
jupyter notebook AYSentimentAnalysis.ipynb
cd backend
docker-compose up -d
Services will run on:
localhost:5432http://localhost:5050http://localhost:8080localhost:50051localhost:50055localhost:50052localhost:50054localhost:50053http://localhost:5001cd frontend
npm install
npm run dev
Frontend will run on: http://localhost:5173
docker run -d \
--name postgres \
-e POSTGRES_USER=ay_user \
-e POSTGRES_PASSWORD=ay_password \
-e POSTGRES_DB=ay_auth_db \
-p 5432:5432 \
postgres:15
# Auth Service
cd backend/auth-service
go run main.go
# Category Service
cd backend/category-service
go run main.go handler.go
# Community Service
cd backend/community-service
go run main.go
# Thread Service
cd backend/thread-service
go run main.go
# Chat Service
cd backend/chat-service
go run main.go
# AI Service
cd backend/ai-service
pip install -r requirements.txt
python app/main.py
# API Gateway
cd backend/api-gateway
go run main.go models.go
After running API Gateway, access Swagger documentation at:
http://localhost:8080/swagger/index.html
POST /register - Register new userPOST /login - Login userPOST /logout - Logout userGET /profile - Get user profileGET /communities - List all communitiesPOST /communities - Create new communityGET /communities/{id} - Get community detailPUT /communities/{id} - Update communityDELETE /communities/{id} - Delete communityGET /threads - List threadsPOST /threads - Create new threadGET /threads/{id} - Get thread detailPOST /threads/{id}/comments - Add commentGET /chats - List chat roomsPOST /chats - Create chat roomWS /ws/chat - WebSocket connectionPOST /ai/predict - Check harmful contentAY.com/
โโโ backend/
โ โโโ docker-compose.yml
โ โโโ auth-service/ # Authentication & user management
โ โโโ category-service/ # Category management
โ โโโ chat-service/ # Real-time chat
โ โโโ community-service/ # Community features
โ โโโ thread-service/ # Posts & threads
โ โโโ ai-service/ # AI content moderation
โ โโโ api-gateway/ # API Gateway & routing
โโโ frontend/
โ โโโ src/
โ โ โโโ components/ # Svelte components
โ โ โโโ pages/ # Page components
โ โ โโโ libs/ # Utilities & helpers
โ โ โโโ store/ # State management
โ โ โโโ types/ # TypeScript types
โ โโโ public/ # Static assets
โ โโโ package.json
โโโ README.md
cd backend/[service-name]
go test ./...
cd frontend
npm run check
npm run lint
cd backend
docker-compose -f docker-compose.prod.yml up -d --build
cd frontend
npm run build
# Output will be in the dist/ folder
Contributions are welcome! Please:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
Developed with โค๏ธ by WEB-ED-242 Team
Happy Coding! ๐ "# AY.com"