Epic Events is an agency that organizes events for its clients. This CRM software allows the collection and processing of client and event data, while facilitating communication between the company's different departments.
This is a command-line interface (CLI) application built with Python 3.
- Clone the repository and navigate to the directory:
git clone https://github.com/Mnr04/OCEpicEvents.git
cd OCEpicEvents- Create and activate a virtual environment (recommended):
python3 -m venv env
source env/bin/activate
# On Windows:
env\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Environment variables configuration:
Create a .env file at the root of the project and add your keys (database, JWT, Sentry):
DATABASE_URL=sqlite:///epic_events.db
SECRET_KEY=your_jwt_secret_key
SENTRY_DSN=your_sentry_keyBefore the first use, you must initialize the database. This command will create the tables and generate a default admin account (Management Team):
python init_db.py
(Default credentials: admin / admin123)The application is run via the main.py entry point.
- The Magic Command (Help)
To discover all available commands and options:
python main.py --help
python main.py users --help
python main.py contracts --help- Login (Authentication)
You must be logged in to access the data:
python main.py auth login
To logout:
python main.py auth logout- Manage Users (Management Team)
# View all users
python main.py users list
# Create a user (Click will prompt you step by step)
python main.py users create
# One line mode
python main.py users create --nom "Alice" --email "alice@epicevents.com" --role "Commercial"
# Update or delete
python main.py users update
python main.py users delete- Manage Clients (Sales Team)
# View the list of all clients
python main.py clients list
# Create a client
python main.py clients create
# Update the company name of a client you are responsible for
python main.py clients update- Manage Contracts
# View all contracts
python main.py contracts list
# View only unsigned contracts
python main.py contracts list --filtre non-signes
# View only unpaid contracts
python main.py contracts list --filtre non-payes
# Create a contract (Management Team only)
python main.py contracts create
# Sign a contract (Sales Team) using the "--signe" flag
python main.py contracts update --contract-id 1 --signe- Manage Events
# View all events
python main.py events list
# Create an event (Sales Team, requires a signed contract)
python main.py events create
# List events that do not have a support contact assigned yet (Management Team)
python main.py events list --filtre sans-support
# Assign a Support colleague to an event (Management Team)
python main.py events update --event-id 1 --support-id 3
# View my own events (Support Team)
python main.py events list --filtre mes-evenementsThe project uses pytest for unit and integration testing.
Run the tests:
python -m pytestCheck code coverage:
coverage run -m pytest
coverage report