A modern web application with user management, permissions, and dashboard features.
- User authentication with Discord OAuth2
- Role-based access control (RBAC)
- Dashboard with real-time statistics
- Database management interface
- User management system
- API endpoints for user management
- Python 3.8+
- MongoDB (local or cloud instance)
- Discord Developer Application (for OAuth2)
- Node.js and npm (for frontend assets if needed)
-
Clone the repository:
git clone https://github.com/yourusername/TechTACT-Website.git cd TechTACT-Website -
Create and activate a virtual environment:
python -m venv venv .\venv\Scripts\activate # On Windows source venv/bin/activate # On macOS/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory with the following variables:FLASK_APP=app.py FLASK_ENV=development FLASK_SECRET_KEY=your-secret-key MONGO_URI=mongodb://localhost:27017/techtact DISCORD_CLIENT_ID=your-discord-client-id DISCORD_CLIENT_SECRET=your-discord-client-secret DISCORD_REDIRECT_URI=http://localhost:5000/callback/discord DISCORD_BOT_TOKEN=your-discord-bot-token DISCORD_GUILD_ID=your-discord-server-id DISCORD_WEBHOOK=your-discord-webhook-url DISCORD_ALERT_WEBHOOK=your-discord-alert-webhook-url
-
Start the Flask development server:
flask run
-
Open your browser and navigate to:
http://localhost:5000
GET /api/users- List all usersPOST /api/users- Create or update a userDELETE /api/users/<discord_id>- Delete a user
Example request to create/update a user:
{
"discord_id": "123456789012345678",
"role": "admin",
"permissions": {
"can_manage_users": true,
"can_view_stats": true,
"can_manage_database": true
}
}To run the test suite:
pytestTechTACT-Website/
├── api/ # API Blueprints
│ ├── __init__.py
│ └── users.py # Users API endpoints
├── static/ # Static files (CSS, JS, images)
│ └── dashboard/ # Dashboard assets
│ ├── css/
│ └── js/
├── templates/ # HTML templates
│ ├── dashboard.html
│ └── permissions_tab.html
├── .env.example # Example environment variables
├── app.py # Main application file
├── requirements.txt # Python dependencies
└── README.md # This file
- Fork the repository
- Create a new 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
This project is licensed under the MIT License - see the LICENSE file for details.