Polis is a revolutionary social media platform designed specifically for gaming communities. What makes Polis unique is that each community has its own AI personality that can interact with members in real-time. Instead of just mentioning other users with @username, you can mention entire communities with @community.ai and receive intelligent, context-aware responses.
- ๐ค Community AI Agents: Each community has a customizable AI that learns from its members and content
- ๐ฏ Gaming Integration: Native support for League of Legends, Valorant, TFT, and Brawl Stars
- ๐ฌ Smart Mentions: Tag communities like
@tft.aior@valorant.aifor instant AI responses - ๐น Media Sharing: Share images and videos (up to 25MB) with CloudFront CDN delivery
- ๐ Tournaments: Organize and manage gaming tournaments within communities
- ๐จ Customization: Flairs, skins, and profile customization options
- โก Real-time Feed: Echo (repost) system with honor (like) functionality
Check out how Polis works: YouTube Demo Video
- Node.js - Server runtime
- Express.js - Web framework
- MongoDB - Primary database
- Redis - Caching and session management
- Mongoose - MongoDB ODM
- OpenAI GPT - Powers community AI responses
- Pinecone - Vector database for AI embeddings
- Riot Games API - Gaming data integration
- Brave Search API - Real-time web search for AI
- AWS S3 - Media storage
- CloudFront CDN - Global content delivery
- SendGrid - Email services
- Stripe - Payment processing
- PayPal - Alternative payment method
- Pug - Template engine
- Vanilla JavaScript - No framework overhead
- CSS3 - Custom styling
- Ionicons - Icon library
- Node.js 18.x or higher
- MongoDB 6.0 or higher
- Redis 7.0 or higher
- AWS Account (for S3 and CloudFront)
- Various API keys (see Configuration)
- Clone the repository
git clone https://github.com/yourusername/polis.git
cd polis- Install dependencies
npm install- Set up environment variables
Create a
config.envfile in the root directory with the following:
# Server Configuration
NODE_ENV=development
PORT=8080
# Database Configuration
DATABASE=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<database>?retryWrites=true
DATABASE_PASSWORD=your_password
DATABASE_NAME_PROD=production
DATABASE_NAME_DEV=development
# Redis Configuration
REDIS_PASSWORD=your_redis_password
# Authentication
JWT_SECRET=your-ultra-secure-jwt-secret
JWT_EXPIRES_IN=90d
JWT_COOKIE_EXPIRES_IN=90
# AI Services
OPEN_AI_KEY=your_openai_api_key
PINECONE_API_KEY=your_pinecone_api_key
BRAVE_SEARCH_API_KEY=your_brave_search_api_key
# AWS Configuration
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_BUCKET_NAME=your_s3_bucket_name
# Gaming APIs
RIOT_API_KEY=your_riot_api_key
LEAGUE_API_KEY=your_league_api_key
VALORANT_API_KEY=your_valorant_api_key
BRAWL_TOKEN=your_brawlstars_token
# Payment Processing
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_CLIENT_SECRET=your_paypal_client_secret
# Email Service
SENDGRID_API_KEY=your_sendgrid_api_key
EMAIL_FROM=your_email@domain.com
# OAuth (Riot Games)
RIOT_CLIENT_ID=your_riot_client_id
RIOT_CLIENT_SECRET=your_riot_client_secret
REDIRECT_URI=https://yourdomain.com/riotCallback- Set up MongoDB
- Create a MongoDB Atlas cluster or use a local MongoDB instance
- Update the DATABASE connection string in config.env
- Set up Redis
- Install Redis locally or use a cloud service like Redis Cloud
- Update REDIS_PASSWORD in config.env
- Configure AWS Services
- Create an S3 bucket for media storage
- Set up CloudFront distribution pointing to your S3 bucket
- Update AWS credentials in config.env
- Start the application
# Development mode
npm run dev
# Production mode
npm start- Create a Community: Set up a gaming community with its own identity
- Train the AI: Add knowledge and personality to your community's AI
- Interact: Members can mention the community AI in posts
- Get Responses: The AI responds based on its training and context
Example:
User: "@tft.ai what's the best comp for this patch?"
TFT AI: "Based on current meta analysis, Invoker Mythic with Ahri carry is
performing exceptionally well. Try: Ahri, Tahm Kench, Jax, Shen..."
- Upload images (up to 5MB) and videos (up to 25MB, 90 seconds)
- Automatic CDN delivery through CloudFront
- Orientation-aware display (portrait/landscape)
polis/
โโโ controllers/ # Route controllers
โโโ models/ # Database models
โโโ routes/ # API routes
โโโ services/ # Business logic (AI, email, etc.)
โโโ public/ # Static files
โ โโโ js/ # Client-side JavaScript
โ โโโ css/ # Stylesheets
โ โโโ img/ # Images
โโโ views/ # Pug templates
โโโ utils/ # Helper functions
โโโ app.js # Express app configuration
โโโ server.js # Server entry point
โโโ config.env # Environment variables
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- ๐ฎ Add support for more games
- ๐ค Improve AI response quality
- ๐จ Enhance UI/UX design
- ๐ฑ Mobile app development
- ๐งช Add more tests
- ๐ Improve documentation
- ๐ Bug fixes
- All user passwords are hashed using bcrypt
- JWT tokens for authentication
- Rate limiting on API endpoints
- Input sanitization to prevent XSS attacks
- MongoDB injection prevention
- Secure cookie configuration
- CloudFront CDN for global content delivery
- Redis caching for frequently accessed data
- Optimized database queries with proper indexing
- Lazy loading for images
- Video streaming with range request support
- Video upload may timeout on slow connections
- Some mobile browsers have issues with video playback controls
- AI responses occasionally timeout under heavy load
This project is licensed under the MIT License - see the LICENSE file for details.
- Your Name - Initial work - GitHub
- Riot Games for their comprehensive gaming APIs
- OpenAI for GPT integration
- The gaming community for inspiration
- All contributors who help improve Polis
- Website: https://polis.gg
- Email: admin@polis.gg
- Discord: Join our server
- Twitter: @PolisGG
Made with โค๏ธ for the gaming community
Star โญ this repo if you find it useful!