Sistema de gestão para clínica veterinária desenvolvido com Python, Flask e MySQL.
O projeto foi criado com o objetivo de praticar desenvolvimento web backend, autenticação de utilizadores, CRUD completo, integração com base de dados e controlo de permissões por perfil de utilizador.
- Python
- Flask
- MySQL
- mysql.connector
- HTML5
- CSS3
- Bootstrap
- Jinja2 Templates
- Git & GitHub
- Session Authentication
- CRUD Operations
- Login and logout
- Session control
- User roles:
- Admin
- Staff
- Client
- Register animals
- Edit animal information
- Delete animals
- List registered animals
- Register clients
- Automatic user creation
- Associate animals with owners
- Register veterinary appointments
- Associate consultations with animals and clients
- Consultation history
- Route protection using sessions
- Role-based permissions
Main tables used in the project:
- users
- clientes
- animais
- consultas
Relationships between entities were implemented using MySQL foreign keys.
CV_Clinica_Veterinaria/
│
├── static/
│ ├── css/
│ ├── js/
│
├── templates/
│
├── app.py
├── database.py
├── requirements.txt
└── README.md
⚙️ Installation and Setup
1️⃣ Clone the repository
git clone https://github.com/Hewllsing/CV_Clinica_Veterinaria.git
2️⃣ Access the project folder
cd CV_Clinica_Veterinaria
3️⃣ Create virtual environment
python -m venv venv
4️⃣ Activate virtual environment
Windows
venv\Scripts\activate
Linux/macOS
source venv/bin/activate
5️⃣ Install dependencies
pip install -r requirements.txt
6️⃣ Configure the database
Create a MySQL database and import the SQL script.
Example:
CREATE DATABASE clinica_veterinaria;
Update your connection settings inside the project:
host="localhost"
user="root"
password="your_password"
database="clinica_veterinaria"
7️⃣ Run the application
python app.py
🔐 Login System
The system uses Flask sessions for authentication and route protection.
Example:
session['user_id']
session['user_role']
🎯 Learning Objectives
This project was developed to improve skills in:
Flask development
MySQL integration
Authentication systems
CRUD operations
MVC architecture concepts
Session management
Route protection
Database relationships
📸 Screenshots
Add screenshots of:
Login page
Dashboard
Animal registration
Consultations
Database structure
📈 Future Improvements
API REST implementation
JWT authentication
Responsive dashboard
Medical records system
File/image upload
Docker support
Deployment on cloud server
👨💻 Author
Leonardo Souza
📫 Contact
LinkedIn: https://www.linkedin.com/in/Ldosouza
Email: [email protected]