Skip to content

secret-point/event-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

🗓️ Mini Event Manager – Backend User Guide

This is the backend service for the Mini Event Manager application. It’s built with Flask and SQLAlchemy, providing a RESTful API for managing company events like workshops, social gatherings, and talks.


How to Run (Python CLI)

The app is launched using main.py, which requires two command-line arguments:

  • --db_path: Path to the SQLite database file (default: ./event.db)
  • --port: Port to run the HTTP server (default: 5001)

Example:

pip install -r requirements.txt
python main.py --db_path ./event.db --port 5001

Flow Overview

  • On startup, the app checks whether the specified database file exists.
  • If it doesn't exist, a new SQLite database is created at the given path.
  • If it does exist, the existing database is used.
  • Once running, the API becomes available on the specified port for frontend access.

🐳 How to Run with Docker

This project includes a Dockerfile and docker-compose.yml for easy containerized setup.

1. Build the Docker image

docker-compose build

2. Run the container

docker-compose up

This will:

  • Start the backend on http://localhost:5001
  • Automatically create or use the existing SQLite DB (event.db)
  • Persist the DB to your host machine using a volume

🌐 CORS Configuration

  • CORS (Cross-Origin Resource Sharing) is enabled for all origins by default.
  • Other options (like restricted origins) are present in the code but currently commented out.

Dependencies

To install manually:

pip install flask flask-cors==3.0.10 sqlalchemy

Or via requirements.txt:

pip install -r requirements.txt

Project Structure

Mini Event Manager/
├── Readme.md
├── main.py                  # Entry point
├── event.db                 # SQLite DB (auto-generated if missing)
├── Dockerfile
├── docker-compose.yml
├── config/
│   └── config.py
├── database/
│   ├── db_manage.py
│   ├── event.py
│   └── event_dao.py
├── server/
│   └── server_manage.py

🖥️ Mini Event Manager – Flutter Frontend (Desktop)

This is the Flutter desktop application for the Mini Event Manager POC. It allows users to view, create, edit, and delete events via a beautiful and responsive UI that connects to a Flask backend API.


📦 Project Structure

frontend/
├── lib/
│   ├── main.dart
│   ├── models/
│   │   └── event.dart
│   ├── services/
│   │   └── api_service.dart
│   └── screens/
│       ├── event_list_screen.dart
│       ├── event_detail_screen.dart
│       └── add_edit_event_screen.dart
├── pubspec.yaml

🚀 How to Run the App

1. Make sure Flutter is installed

Follow https://docs.flutter.dev/get-started/install
Run the following to verify:

flutter doctor

Make sure desktop support is enabled (macOS, Windows, or Linux).

2. Create the project and get dependencies

flutter pub get

3. Run the app

flutter run -d windows     # Or use -d macos or -d linux depending on your OS

🌐 API Setup

Make sure the backend Flask API is running at:

http://localhost:5001

You can change the backend API base URL in lib/services/api_service.dart.


✅ Features

  • View a list of events with clean cards
  • Create new events with validation
  • Edit existing events
  • Delete events (with confirmation dialog)
  • Pick date & time using native selectors
  • Responsive and modern UI using Material 3

🧪 Dependencies

These are listed in pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  http: ^0.13.6
  intl: ^0.18.1

⚠️ Notes

  • This project is designed for desktop (not mobile).
  • Backend must be running on localhost with CORS enabled.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published