A basic full-stack application to manage data efficiently, including fetching data from a MySQL database, and providing the functionality to display, add, update, and delete records using a Flask backend and an Angular frontend with AG-Grid for a dynamic user interface.
-
Frontend:
- Angular: Framework for building the user interface.
- AG-Grid: Advanced grid library for displaying and manipulating data efficiently.
- Angular Material: Optional library for UI components and styling.
-
Backend:
- Python: Programming language for the backend.
- Flask: Lightweight web framework to handle routing and APIs.
- MySQL: Relational database used for storing data.
- MySQL Connector (pymysql): Library to interact with the MySQL database.
- Display Records: View all records in a dynamic grid.
- Add Record: Add new record.
- Update Record: Edit existing records.
- Delete Record(s): Remove records from the database.
- Filter & Sort: Easily filter and sort data within the grid.
-
Backend:
- Fetch Data: API to fetch data from MySQL.
- Add/Update/Delete: APIs to manipulate data.
- Flask handles the server-side logic and interacts with the database.
-
Frontend:
- AG-Grid displays data in a structured and sortable table format.
- User actions (Add, Edit, Delete) are handled through Angular service, making HTTP calls to the Flask backend.
-
Database:
- MySQL database stores data with tables designed for efficient querying and manipulation.
- Backend: Python (3.9+), MySQL Server.
- Frontend: Node.js (16+), Angular CLI.
- Clone the repository:
git clone https://github.com/alokverma18/SmartGrid.git cd SmartGrid
- Install backend dependencies:
cd Backend pip install -r requirements.txt
- Configure the database by creating a .env file (sample given below):
MYSQL_DATABASE_USER=root MYSQL_DATABASE_PASSWORD=xyz MYSQL_DATABASE_DB=employee MYSQL_DATABASE_HOST=localhost
- Start the Flask server:
python main.py
- Navigate baack to the root directory (SmartGrid) and install frontend dependencies:
cd .. npm install
- Start the Angular development server:
ng serve
- Access the application at localhost (or as specified in your terminal)
All contributions are welcome! If you spot any issues, have suggestions, or want to add features, feel free to create a PR. Thanks for contributing to this project! 🚀