This project is an employee time tracking system that allows users to log in, view their dashboard, and mark their schedule.
- Installed Python 3.x
- Installed and configured PostgreSQL
- Log in to PostgreSQL:
psql -U your_username -d postgres
- Create a new database by executing the SQL command:
CREATE DATABASE your_database_name;
Run the following SQL commands to create the required tables:
CREATE TABLE empleados (
id SERIAL PRIMARY KEY,
nombre VARCHAR(50),
apellido VARCHAR(50),
numero_empleado INT UNIQUE
);
CREATE TABLE marcas_horario (
id SERIAL PRIMARY KEY,
numero_empleado INT,
tipo_marca VARCHAR(50),
timestamp DATE,
hora_marca TIME,
FOREIGN KEY (numero_empleado) REFERENCES empleados(numero_empleado)
);
- Clone the repository: git clone repository_URL
- Install dependencies: pip install -r requirements.txt
- Modify the app.py file:
- Replace "REPLACE_WITH_SECURE_SECRET_KEY" with your secure secret key.
- Replace "REPLACE_WITH_DATABASE_NAME", "REPLACE_WITH_USERNAME", "REPLACE_WITH_PASSWORD", "REPLACE_WITH_HOST", and "REPLACE_WITH_PORT" with your PostgreSQL database details.
- Run the following command: python app.py
- Access the application in your web browser: http://localhost:5000/
- app.py: Main file with Flask application logic.
- login.html: HTML template for the login page.
- dashboard.html: HTML template for the employee dashboard.
- script.js: JavaScript file with client-side interactions.
- styles.css: CSS file for custom styles.
This project was developed by [https://github.com/dev-mariart].