Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,41 @@ DOMAIN=localhost
# Environment: local, staging, production
ENVIRONMENT=local

PROJECT_NAME="Full Stack FastAPI Project"
PROJECT_NAME="SOCIA"
STACK_NAME=full-stack-fastapi-project

# Backend
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,http://localhost.tiangolo.com"
SECRET_KEY=changethis
FIRST_SUPERUSER=admin@example.com
FIRST_SUPERUSER_PASSWORD=changethis
SECRET_KEY=PDma3zqc5pq9LZVfVj7qL5bB6mC4OCIN0sKdjSiKOlI
FIRST_SUPERUSER=arpit.singh@example.com
FIRST_SUPERUSER_PASSWORD=SOciaSOcia

# Otpless
CLIENT_ID = "CLIENT_ID"
CLIENT_SECRET = "CLIENT_SECRET"
# Emails
SMTP_HOST=
SMTP_USER=
SMTP_PASSWORD=
EMAILS_FROM_EMAIL=info@example.com
SMTP_HOST=[email protected]
SMTP_USER=[email protected]
SMTP_PASSWORD=SOciaSOcia
EMAILS_FROM_EMAIL=arpit.singh@example.com
SMTP_TLS=True
SMTP_SSL=False
SMTP_PORT=587

# Postgres
POSTGRES_SERVER=localhost
POSTGRES_PORT=5432
POSTGRES_DB=app
POSTGRES_USER=postgres
POSTGRES_PASSWORD=changethis
POSTGRES_SERVER=aws-0-ap-south-1.pooler.supabase.com
POSTGRES_PORT=6543
POSTGRES_USER=postgres.uiwsgdtnmovxahfgxfkj
POSTGRES_PASSWORD=Aa1sociaaicos
POSTGRES_DB=sociadb

SENTRY_DSN=

# Configure these with your own Docker registry images
DOCKER_IMAGE_BACKEND=backend
DOCKER_IMAGE_FRONTEND=frontend

# MAPS Config
GOOGLE_API_KEY = "AIzaSyBGEPYgPDaNeWKqxXko0GWJ1Ipl75q1OlM"
GOOGLE_REVERSE_GEOCODE_URL = "https://maps.googleapis.com/maps/api/geocode/json"
GOOGLE_PLACES_URL = "https://maps.googleapis.com/maps/api/place/textsearch/json"
GOOGLE_PLACE_DETAILS_URL = "https://maps.googleapis.com/maps/api/place/details/json"
49 changes: 0 additions & 49 deletions .github/workflows/generate-client.yml
Original file line number Diff line number Diff line change
@@ -1,49 +0,0 @@
name: Generate Client

on:
pull_request:
types:
- opened
- synchronize

jobs:
generate-client:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.FULL_STACK_FASTAPI_TEMPLATE_REPO_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: npm ci
working-directory: frontend
- run: pip install ./backend
- run: bash scripts/generate-client.sh
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git add frontend/src/client
git diff --staged --quiet || git commit -m "✨ Autogenerate frontend client"
git push

# https://github.com/marketplace/actions/alls-green#why
generate-client-alls-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- generate-client
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

67 changes: 0 additions & 67 deletions .github/workflows/playwright.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ node_modules/
/playwright-report/
/blob-report/
/playwright/.cache/
.history/
.DS_Store

9 changes: 1 addition & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
"cwd": "${workspaceFolder}/backend",
"jinja": true,
"envFile": "${workspaceFolder}/.env",
},
{
"type": "chrome",
"request": "launch",
"name": "Debug Frontend: Launch Chrome against http://localhost:5173",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}/frontend"
},
}
]
}
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ The input variables, with their default values (some auto generated) are:

Backend docs: [backend/README.md](./backend/README.md).

## Frontend Development

Frontend docs: [frontend/README.md](./frontend/README.md).

## Deployment

Deployment docs: [deployment.md](./deployment.md).
Expand Down
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ app.egg-info
.coverage
htmlcov
.cache
.venv
.venv
File renamed without changes.
2 changes: 2 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ COPY ./prestart.sh /app/
COPY ./tests-start.sh /app/

COPY ./app /app/app

RUN poetry run pip list
10 changes: 5 additions & 5 deletions backend/app/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from app.core.config import settings # noqa

target_metadata = SQLModel.metadata

print("target_metadata in env:", SQLModel.metadata.tables)
# other values from the config, defined by the needs of env.py,
# can be acquired:
# my_important_option = config.get_main_option("my_important_option")
Expand Down Expand Up @@ -78,7 +78,7 @@ def run_migrations_online():
context.run_migrations()


if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
# if context.is_offline_mode():
# run_migrations_offline()
# else:
run_migrations_online()

This file was deleted.

29 changes: 29 additions & 0 deletions backend/app/alembic/versions/20cc9e9039fd_create_qr_codes_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""Create qrcode table

Revision ID: 20cc9e9039fd
Revises: 91f6f2bc36a4
Create Date: 2024-11-01 10:17:32.083891

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision = '20cc9e9039fd'
down_revision = '91f6f2bc36a4'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Add explicit UserVenueAssociation for UserBusiness and Venue

Revision ID: 3078d16ee962
Revises: 8c693686becd
Create Date: 2024-10-24 14:55:49.010006

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision = '3078d16ee962'
down_revision = '8c693686becd'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_venue_association', sa.Column('id', sa.Uuid(), nullable=False))
op.add_column('user_venue_association', sa.Column('role', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user_venue_association', 'role')
op.drop_column('user_venue_association', 'id')
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""Make phone_number nullable in user_business

Revision ID: 4951a24acf4c
Revises: e2955dcf9b00
Create Date: 2024-10-26 15:19:32.622093

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision = '4951a24acf4c'
down_revision = 'e2955dcf9b00'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('user_business', 'email',
existing_type=sa.VARCHAR(length=255),
nullable=False)
op.alter_column('user_business', 'phone_number',
existing_type=sa.VARCHAR(),
nullable=True)
op.drop_index('ix_user_business_phone_number', table_name='user_business')
op.drop_index('ix_user_public_email', table_name='user_public')
op.add_column('user_venue_association', sa.Column('user_id', sa.Uuid(), nullable=False))
op.drop_constraint('user_venue_association_user_business_id_fkey', 'user_venue_association', type_='foreignkey')
op.create_foreign_key(None, 'user_venue_association', 'user_business', ['user_id'], ['id'])
op.drop_column('user_venue_association', 'user_business_id')
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_venue_association', sa.Column('user_business_id', sa.UUID(), autoincrement=False, nullable=False))
op.drop_constraint(None, 'user_venue_association', type_='foreignkey')
op.create_foreign_key('user_venue_association_user_business_id_fkey', 'user_venue_association', 'user_business', ['user_business_id'], ['id'])
op.drop_column('user_venue_association', 'user_id')
op.create_index('ix_user_public_email', 'user_public', ['email'], unique=True)
op.create_index('ix_user_business_phone_number', 'user_business', ['phone_number'], unique=True)
op.alter_column('user_business', 'phone_number',
existing_type=sa.VARCHAR(),
nullable=False)
op.alter_column('user_business', 'email',
existing_type=sa.VARCHAR(length=255),
nullable=True)
# ### end Alembic commands ###
Loading
Loading