feat: major API restructure and Vue.js frontend integration

- Centralize API endpoints in dedicated api app with v1 versioning
- Remove individual API modules from parks and rides apps
- Add event tracking system with analytics functionality
- Integrate Vue.js frontend with Tailwind CSS v4 and TypeScript
- Add comprehensive database migrations for event tracking
- Implement user authentication and social provider setup
- Add API schema documentation and serializers
- Configure development environment with shared scripts
- Update project structure for monorepo with frontend/backend separation
This commit is contained in:
pacnpal
2025-08-24 16:42:20 -04:00
parent 92f4104d7a
commit e62646bcf9
127 changed files with 27734 additions and 1867 deletions

View File

@@ -5,8 +5,7 @@ from django.utils.translation import gettext_lazy as _
import os
import secrets
from apps.core.history import TrackedModel
# import pghistory
import pghistory
def generate_random_id(model_class, id_field):
@@ -23,6 +22,7 @@ def generate_random_id(model_class, id_field):
return new_id
@pghistory.track()
class User(AbstractUser):
class Roles(models.TextChoices):
USER = "USER", _("User")
@@ -79,6 +79,7 @@ class User(AbstractUser):
super().save(*args, **kwargs)
@pghistory.track()
class UserProfile(models.Model):
# Read-only ID
profile_id = models.CharField(
@@ -137,6 +138,7 @@ class UserProfile(models.Model):
return self.display_name
@pghistory.track()
class EmailVerification(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
token = models.CharField(max_length=64, unique=True)
@@ -151,6 +153,7 @@ class EmailVerification(models.Model):
verbose_name_plural = "Email Verifications"
@pghistory.track()
class PasswordReset(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
token = models.CharField(max_length=64)