Commit Graph

296 Commits

Author SHA1 Message Date
Felipe Cardoso
b3689fd6c4 Rename metadata fields for clarity and specificity
Updated `metadata` field names to `media_metadata` and `notification_metadata` in the eventspace ER schema. This improves clarity by providing more context-specific naming for better understanding and maintainability.
2025-02-28 09:58:50 +01:00
Felipe Cardoso
636e278db7 Rename metadata fields for clarity and specificity
Updated `metadata` field names to `media_metadata` and `notification_metadata` in the eventspace ER schema. This improves clarity by providing more context-specific naming for better understanding and maintainability.
2025-02-28 09:35:02 +01:00
Felipe Cardoso
fd676f850b Add initial models and database tables
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Successful in 47s
Build and Push Docker Images / build-frontend (push) Has been skipped
This migration introduces all initial database models and their respective tables, relationships, and constraints. It includes entities such as users, events, guests, themes, media, and various related entities to support application functionality. This serves as a foundational schema for the project.
2025-02-28 09:22:20 +01:00
Felipe Cardoso
a60eb045b4 Refactor Alembic setup and add migration helper script.
Updated Alembic configuration and folder structure to reference the `app` module. Introduced a new `migrate.py` script to manage migrations efficiently with commands for generating, applying, and inspecting migrations. Adjusted `env.py` to ensure proper model imports and use environment-driven database URLs.
2025-02-28 09:22:05 +01:00
Felipe Cardoso
dfeb10c351 Refactor config and database handling.
Move configuration logic to a more modular structure and enhance database URL generation using individual components from environment variables. Adjust database initialization to utilize the updated settings for improved maintainability and clarity.
2025-02-28 09:21:48 +01:00
Felipe Cardoso
632330b4ac Refactor models to improve consistency and relationships
Updated `Base` import to use centralized `app.core.database.Base` for consistency. Enhanced `TimestampMixin` and `UUIDMixin` with docstrings for clarity. Fixed metadata reference in `guest_gifts` table and added relationships in `email_template`.
2025-02-28 09:21:02 +01:00
Felipe Cardoso
a924e0d5b2 Add .env file support to docker-compose configurations
Added the `env_file` directive to both `docker-compose.yml` and `docker-compose.dev.yml` to load environment variables from a `.env` file. This ensures consistent environment variable management across different configurations.
2025-02-28 09:20:42 +01:00
Felipe Cardoso
c1caea44e8 ```
Rename metadata fields for clarity and fix imports.

Updated metadata-related field names across models to improve clarity and consistency (e.g., `metadata` to `media_metadata` and `notification_metadata`). Fixed an error in `guest_gifts` metadata reference and added a proper imports initialization in `__init__.py` for all models.
```
2025-02-28 08:34:49 +01:00
Felipe Cardoso
9d71fc7fcd Add models for EmailTemplate, ActivityLog, and NotificationLog
Introduced new database models to handle email templates, activity logs, and notification logs, including relevant enums and utilities. Updated ER diagram to reflect new relationships and attributes, enhancing event tracking and notification management capabilities.
2025-02-27 19:54:26 +01:00
Felipe Cardoso
7247190f5f Refactor event schema to enhance clarity and functionality
Updated attributes, relationships, and data types to improve schema accuracy and flexibility. Added new enums, foreign keys, and reordered fields for better organization. Renamed and adjusted components to reflect evolving business logic.
2025-02-27 19:12:47 +01:00
Felipe Cardoso
46fabc38a4 Add EventMedia and GiftCategory models
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Successful in 48s
Build and Push Docker Images / build-frontend (push) Has been skipped
Introduce EventMedia for managing media files linked to events, including file metadata, purpose, and relationships. Add GiftCategory to categorize gifts, featuring unique constraints, display options, and utility methods for handling related gifts.
2025-02-27 19:08:48 +01:00
Felipe Cardoso
e60a016ab1 Add RSVP model with status tracking and guest constraints
All checks were successful
Build and Push Docker Images / changes (push) Successful in 6s
Build and Push Docker Images / build-backend (push) Successful in 50s
Build and Push Docker Images / build-frontend (push) Has been skipped
Introduce a new RSVP model to manage responses for events, including status, guest count, and additional details like dietary requirements. Enforce uniqueness for each guest per event and provide functionality to update RSVP status. This will support efficient event RSVP handling and data integrity.
2025-02-27 18:45:08 +01:00
Felipe Cardoso
1d1452f716 Add RSVP model with status tracking and guest constraints
Introduce a new RSVP model to manage responses for events, including status, guest count, and additional details like dietary requirements. Enforce uniqueness for each guest per event and provide functionality to update RSVP status. This will support efficient event RSVP handling and data integrity.
2025-02-27 18:45:06 +01:00
Felipe Cardoso
2326767c54 Add Guest model for event guest management
This commit introduces the `Guest` model to manage event guests, including their details, status, RSVP tracking, and relationships with events and users. It also supports features like invitation handling, guest statuses, and guest-to-gift associations. This forms the foundation for handling guest-related functionalities in the backend.
2025-02-27 18:23:51 +01:00
Felipe Cardoso
20f9d89cd8 Add EventManager model with roles and permissions
Introduce the `EventManager` model to manage event roles and permissions. Roles include `OWNER`, `ADMIN`, `MODERATOR`, and `VIEWER`, each with specific default permissions. The model supports explicit permissions, relationships, constraints, and a helper method for initializing event owners.
2025-02-27 18:23:45 +01:00
Felipe Cardoso
ca399e5c68 Add Event and EventTheme models
Introduces models for events and their themes, including fields for event details, location, timing, and settings. The `EventTheme` model supports theme customization with color palettes and fonts, while establishing relationships with the `Event` model. These additions prepare the database for event-related functionality.
2025-02-27 18:14:47 +01:00
Felipe Cardoso
dcdfe8732c Add base and user models with essential fields and mixins
Created reusable `Base`, `UUIDMixin`, and `TimestampMixin` in `base.py`. Added a `User` model with attributes, relationships, and database configurations in `user.py` to establish a foundation for user-related features.
2025-02-27 18:14:38 +01:00
Felipe Cardoso
0a6918c85b Refactor ER diagram to add EventManager and update relations
Introduce the EventManager entity to improve role management, linking it between Users and Events. Adjust relationships among User, Event, and Guest, and refine EventTheme and User attributes. These changes enhance schema clarity and better represent user roles and permissions.
2025-02-27 18:10:08 +01:00
Felipe Cardoso
3ecf5fee2e Add ER diagram for EventSpace schema using Mermaid
This commit introduces a comprehensive Entity Relationship (ER) diagram for the EventSpace schema in Mermaid format. It documents key entities, their attributes, and relationships, providing a clear visualization of the database structure. This will aid in understanding and maintaining the data model.
2025-02-27 18:03:08 +01:00
Felipe Cardoso
1b2db7d5f4 Fix CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Successful in 51s
Build and Push Docker Images / build-frontend (push) Successful in 56s
2025-02-27 17:50:02 +01:00
Felipe Cardoso
4436977089 Fix CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 6s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Successful in 56s
2025-02-27 17:48:09 +01:00
Felipe Cardoso
97efa03c88 Fix CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 6s
Build and Push Docker Images / build-backend (push) Successful in 49s
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:46:53 +01:00
Felipe Cardoso
7fbe5e56fb Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-frontend (push) Has been skipped
Build and Push Docker Images / build-backend (push) Has been skipped
2025-02-27 17:44:49 +01:00
Felipe Cardoso
7e31be49f4 Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:44:27 +01:00
Felipe Cardoso
2cb86f072f Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:42:22 +01:00
Felipe Cardoso
1d6cdca84f Test CI 2025-02-27 17:41:50 +01:00
Felipe Cardoso
ea71b17ce3 Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 5s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:40:16 +01:00
Felipe Cardoso
f85e4a5c1f Test CI 2025-02-27 17:39:39 +01:00
Felipe Cardoso
2f0782e079 Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 3s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:31:51 +01:00
Felipe Cardoso
bd5b03ca08 Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:31:26 +01:00
Felipe Cardoso
7a0d6ca781 Test CI
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Has been skipped
2025-02-27 17:29:42 +01:00
Felipe Cardoso
4f0dd76436 Add conditional Docker builds for backend and frontend
Refactor workflow to build Docker images based on file changes. Introduce checks to determine if backend or frontend directories were modified. Optimize build processes and include support for manual triggers and version tagging.
2025-02-27 17:28:22 +01:00
Felipe Cardoso
58c360285f Set up container image for Docker-based CI workflow
All checks were successful
Build and Push Docker Images / build-and-push (push) Successful in 1m53s
Added a container image definition to use ghcr.io/catthehacker/ubuntu:act-latest in the build-and-push job. This enhances compatibility when running the workflow locally with act and ensures consistency in the execution environment. Corrected spacing in the secrets configuration for better code formatting.
2025-02-27 17:23:24 +01:00
Felipe Cardoso
1af4f1c07d Remove QEMU setup from Docker build workflow
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 13s
The QEMU setup step was redundant and has been removed to simplify the workflow. This change reduces unnecessary actions without impacting the Docker build process.
2025-02-27 16:26:31 +01:00
Felipe Cardoso
bce7a41d78 Add QEMU setup step to Docker build workflow
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 15s
This ensures cross-platform builds by configuring QEMU in the workflow. It improves compatibility for building images targeting multiple architectures.
2025-02-27 16:25:15 +01:00
Felipe Cardoso
ae0015bad2 Add QEMU setup step to Docker build workflow
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 20s
This ensures cross-platform builds by configuring QEMU in the workflow. It improves compatibility for building images targeting multiple architectures.
2025-02-27 16:24:30 +01:00
Felipe Cardoso
8bef4fba45 Update workflow to run on Docker instead of Ubuntu
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 1m6s
Switching the runner to Docker improves consistency and aligns with containerized build environments. This change ensures better compatibility and reduces discrepancies in builds.
2025-02-27 16:18:13 +01:00
Felipe Cardoso
407e93a8c7 Add CI workflow for Docker image build and push
Some checks failed
Build and Push Docker Images / build-and-push (push) Has been cancelled
This workflow automates building and pushing Docker images for the backend and frontend to the Gitea registry. It triggers on `main` branch pushes, tag pushes, or manual dispatch and supports version tagging based on Git references.
2025-02-27 16:12:02 +01:00
Felipe Cardoso
1e9b94ade8 Update Node.js version requirement to 20+ in README
This change updates the Node.js prerequisite from version 18+ to 20+ in the README. It ensures compatibility with the latest features and dependencies of the project.
2025-02-27 16:11:59 +01:00
Felipe Cardoso
b7d60d1f29 Update README with detailed EventSpace project information
Expanded the README to include a comprehensive overview of the EventSpace platform. Added sections on features, setup instructions, technical stack, development guidelines, and privacy notice. This improves clarity for both guests and administrators.
2025-02-27 14:46:17 +01:00
Felipe Cardoso
54d8032798 Add deployment and image push support to Makefile
Introduced a new `deploy` target for deploying services and a `push-images` target for building and pushing Docker images. Added a default `VERSION` and `REGISTRY` variable for streamlined image tagging and registry management. Included a `docker-compose.deploy.yml` file for deployment configuration.
2025-02-27 13:47:13 +01:00
Felipe Cardoso
d283f3a3ed Refactor Docker setup for environment flexibility and dev support
Moved environment variables to .env.template for better management and updated docker-compose files to use them. Added separate docker-compose.dev.yml for development, a Makefile for streamlined commands, and split backend Dockerfile into development and production stages. Updated .gitignore to include new changes.
2025-02-27 13:23:14 +01:00
Felipe Cardoso
03f4792232 Add frontend service to Docker setup and configure networking
Introduced a new `frontend` service in `docker-compose.yml`, complete with build, healthchecks, and networking. Added a multi-stage Dockerfile for the frontend, a `.dockerignore` file, and a startup script to wait for the backend. Updated Next.js configuration for Docker compatibility and added API type definitions.
2025-02-27 12:59:39 +01:00
Felipe Cardoso
3f1e1320f2 Add initial Docker and Alembic setup
Introduce a `docker-compose.yml` to define the services for backend and database with health checks. Add Alembic configurations for database migrations and an initial empty migration. Include backend-related Docker setup with an entrypoint script for database migration execution.
2025-02-27 12:50:44 +01:00
Felipe Cardoso
1d00b092fd Add initial setup for frontend and backend
This commit includes configurations and boilerplate code for both frontend and backend. The frontend uses Next.js with Tailwind CSS, while the backend is built with FastAPI. Various essential files like `tsconfig.json`, `requirements.txt`, and `.gitignore` have been added to kickstart the development process.
2025-02-27 12:50:35 +01:00
Felipe Cardoso
f4c01d9822 Initial commit 2025-02-27 10:11:41 +00:00