ActPoly is a web-based implementation of the classic Monopoly board game. This project features a React-based front end and a Python Flask backend, designed for multiplayer gameplay with real-time interaction.
The project is organized into two main components:
- Built with React and JavaScript
- Manages game UI, player interactions, and game state visualization
- Key features:
- Interactive game board
- Real-time player updates
- Dice rolling and movement
- Property management
- Game state synchronization
- Built with Python Flask
- Handles game logic, state management, and player synchronization
- Manages database interactions for game persistence
- Provides RESTful API endpoints for the client
- Implements WebSocket for real-time updates
- RESTful API Architecture: Organized API routes for game state management
- Custom Game Engine: Handles game logic, rules, and flow
- Player Management System: User registration, authentication, and session tracking
- Database Integration: SQLAlchemy ORM for persistent game state storage
- Real-time Communication: Socket.IO implementation for instant game updates
- JWT Authentication: Secure user sessions and API access
- Game State Management: Logic for tracking properties, money, player positions, and game events
- Modular Structure: Clear separation of concerns with models, controllers, and service layers
- Configuration Management: Flexible environment-based configuration
- Database Migrations: Structured schema updates via migration scripts
- Python-based Game Logic: Core game mechanics implemented in Python
-
Frontend:
- React
- JavaScript
- HTML/CSS
- Socket.IO client
- Material UI components
-
Backend:
- Python
- Flask
- SQLAlchemy (Database ORM)
- WebSockets/Socket.IO
- JWT Authentication
- PostgreSQL database
- RESTful API design
- Alembic for database migrations
-
Infrastructure:
- Docker for containerization
- Docker Compose for orchestrating multi-container setup
- Node.js and npm
- Python 3.9+
- PostgreSQL (for local database)
- Docker and Docker Compose (for containerized deployment)
-
Clone the repository:
git clone https://github.com/LilConsul/actPoly-monopoly.git cd actPoly-monopoly -
Set up the client:
cd client npm install npm start -
Set up the server:
cd server pip install -r requirements.txt # Set up environment variables cp .env.example .env # Edit .env file with your database credentials # Initialize database flask db upgrade # Start the server python app.py
-
Build and start the containers:
docker-compose up --build
-
Access the application at http://localhost:3000
The backend provides the following key API endpoints:
/api/users- User management/api/games- Game creation and listing/api/game/<game_id>- Game state management/api/game/<game_id>/players- Player management within a game/api/game/<game_id>/properties- Property management/api/auth- Authentication endpoints
- Classic Monopoly gameplay mechanics
- Multiplayer support
- Real-time game state updates
- Property management (buying, selling, mortgaging)
- Dice rolling and movement
- Turn-based gameplay
- In-game chat and notifications
- Game state persistence
- Player banking system
- Chance and Community Chest cards
- Property auctions
- House and hotel building
This project is currently a Work in Progress (WIP). Core functionality is being actively developed, and new features are being added regularly.
[License information not specified]