A full-stack web application for managing student records at PNC (Passerelles Numériques Cambodia) with a Flask backend and a modern JavaScript frontend. The application allows administrators to perform CRUD operations on student data and export records in CSV or JSON format.
- View all students in a responsive table
- Add new student records with validation
- Edit existing student details
- Delete student records
- Export student data to CSV or JSON
- Responsive design that works on desktop and mobile
- Modern, user-friendly interface with PNC branding
- Secure data management with CSV backend
- Python 3.8+
- pip (Python package manager)
- Modern web browser (Chrome, Firefox, Safari, Edge)
-
Clone the repository:
git clone <repository-url> cd employee-management-system
-
Set up the backend:
cd backend pip install -r requirements.txt
-
Start the backend server (from the backend directory):
python app.py
The backend will be available at
http://localhost:8000
-
In a new terminal, start the frontend server (from the project root):
cd frontend python -m http.server 5500
The frontend will be available at
http://localhost:5500
GET /api/employees
- Get all employeesGET /api/employees/<id>
- Get a specific employeePOST /api/employees
- Add a new employeePUT /api/employees/<id>
- Update an employeeDELETE /api/employees/<id>
- Delete an employeeGET /api/export/csv
- Export all employees as CSVGET /api/export/json
- Export all employees as JSON
myapp/
├── backend/
│ ├── app.py # Flask application
│ ├── requirements.txt # Python dependencies
│ └── data/
│ └── employees.csv # Employee data storage
└── frontend/
├── index.html # Main HTML file
├── style.css # Styling
└── script.js # Frontend JavaScript
Student records are stored in CSV format with the following fields:
id
: Unique identifier (integer)name
: Full name (string)age
: Age in years (integer)department
: Department/Class name (string)salary
: Stipend/Scholarship amount (number)email
: Email address (string)
- Python 3.8 or higher
- Modern web browser (Chrome, Firefox, Edge, Safari)
- Git (for version control)
-
Clone the repository:
git clone https://github.com/phanphoun/csv-json-xml.git cd csv-json-xml
-
Set up the backend:
cd backend pip install -r requirements.txt
-
Start the backend server:
python app.py
The API will be available at
http://localhost:8000
-
In a new terminal, start the frontend server:
cd frontend python -m http.server 5500
The application will be available at
http://localhost:5500
- 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.
myapp/
├── backend/
│ ├── app.py # Flask application
│ ├── requirements.txt # Python dependencies
│ └── data/
│ └── employees.csv # Student data storage
└── frontend/
├── index.html # Main HTML file
├── style.css # Styling
├── script.js # Frontend JavaScript
└── image/ # Project images and assets
└── pnc.jpg # PNC logo
- Fork the repository
- Create your feature 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.
- Built with Flask and vanilla JavaScript
- Uses Pandas for data manipulation
- Responsive design with CSS Grid and Flexbox
- PNC (Passerelles Numériques Cambodia) for the inspiration