diff --git a/app/templates/base.html b/app/templates/base.html new file mode 100644 index 0000000..27dad78 --- /dev/null +++ b/app/templates/base.html @@ -0,0 +1,58 @@ + + + + + + LeoCRM + + + + +
+ {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
{{ message }}
+ {% endfor %} + {% endif %} + {% endwith %} + {% block content %}{% endblock %} +
+ + diff --git a/app/templates/company_form.html b/app/templates/company_form.html new file mode 100644 index 0000000..acf5e22 --- /dev/null +++ b/app/templates/company_form.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block content %} +

{% if company %}Firma bearbeiten{% else %}Neue Firma{% endif %}

+
+ + + + + + + + + + + + + + Abbrechen +
+{% endblock %} diff --git a/app/templates/contact_form.html b/app/templates/contact_form.html new file mode 100644 index 0000000..68bb1c7 --- /dev/null +++ b/app/templates/contact_form.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block content %} +

{% if contact %}Kontakt bearbeiten{% else %}Neuer Kontakt{% endif %} – {{ company.name }}

+
+ + + + + + + + + + + + + + Abbrechen +
+{% endblock %} diff --git a/app/templates/contact_list.html b/app/templates/contact_list.html new file mode 100644 index 0000000..4a31326 --- /dev/null +++ b/app/templates/contact_list.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% block content %} +

{{ company.name }} – Kontaktpersonen

+Neuer Kontakt +Zurück +{% if contacts %} + + + + + + + + + + + + {% for c in contacts %} + + + + + + + + {% endfor %} + +
NamePositionEmailTelefonAktionen
{{ c.first_name }} {{ c.last_name }}{{ c.position or '-' }}{{ c.email or '-' }}{{ c.phone or '-' }} + Edit +
+ +
+
+{% else %} +

Keine Kontaktpersonen erfasst.

+{% endif %} +{% endblock %} diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html new file mode 100644 index 0000000..3062976 --- /dev/null +++ b/app/templates/dashboard.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} +{% block content %} +

Dashboard

+Neue Firma +{% if companies %} + + + + + + + + + + + {% for c in companies %} + + + + + + + {% endfor %} + +
NameTelefonEmailAktionen
{{ c.name }}{{ c.phone or '-' }}{{ c.email or '-' }} + Edit +
+ +
+
+{% else %} +

Noch keine Firmen erfasst.

+{% endif %} +{% endblock %} diff --git a/app/templates/login.html b/app/templates/login.html new file mode 100644 index 0000000..359c936 --- /dev/null +++ b/app/templates/login.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block content %} +

Login

+
+ + + + + +
+

Noch kein Konto? Registrieren

+{% endblock %} diff --git a/app/templates/register.html b/app/templates/register.html new file mode 100644 index 0000000..7491a52 --- /dev/null +++ b/app/templates/register.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block content %} +

Registrieren

+
+ + + + + +
+

Bereits registriert? Anmelden

+{% endblock %} diff --git a/requirements.md b/requirements.md new file mode 100644 index 0000000..f20f59c --- /dev/null +++ b/requirements.md @@ -0,0 +1,40 @@ +# LeoCRM – Requirements + +## Overview +A minimal web CRM for managing companies and their contact persons, with user authentication. + +## Functional Requirements + +### FR1: User Authentication +- Users can register with username and password +- Users can login/logout +- Passwords are hashed with bcrypt +- Session management via Flask-Login + +### FR2: Company Management +- Authenticated users can create, view, edit, and delete companies +- Company fields: name, address, phone, email, website, notes +- List view with search/filter + +### FR3: Contact Person Management +- Each contact person belongs to a company +- Fields: first_name, last_name, email, phone, position, notes +- CRUD operations, linked to company + +### FR4: Web UI +- Jinja2 templates with basic styling +- Navigation between sections +- Forms with validation + +## Non-Functional Requirements +- SQLite database (no external DB needed) +- Runs on single server (Flask built-in or gunicorn) +- Deployable via Coolify (Docker) +- Code in Git (Forgejo) + +## Out of Scope +- Multi-tenancy +- REST API +- Advanced search +- File uploads +- Email notifications