Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription feature #8

Merged
merged 141 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
b07d71b
[feat] Added form to subscribe on main page
Aurelien-Gindre Dec 5, 2024
f2a1b3d
setup supabase
Dec 5, 2024
177a1cd
feature newsletter mail
Dec 9, 2024
498e756
fix module import in newsletters
Dec 9, 2024
63922c0
[fix] Fix useless line in the Makefile
Aurelien-Gindre Dec 9, 2024
3dde13d
feature : config supabase subscribers table
Loulou5702 Dec 9, 2024
6668097
fix : english commentary in seed.sql
Loulou5702 Dec 9, 2024
9767434
fix package.json delete
Loulou5702 Dec 9, 2024
835004c
feature : subscription mechanism working
Loulou5702 Dec 9, 2024
ab4c834
feature : sending a basic welcome mail
Loulou5702 Dec 10, 2024
2c14cd6
feature newsletter mail
Dec 9, 2024
be1cc9d
fix module import in newsletters
Dec 9, 2024
1df8e72
Merge branch 'feature/newsletter_mail' of github.com:theosli/curator-…
Aurelien-Gindre Dec 11, 2024
4002919
[chore] removed unused function
Dec 11, 2024
6a40e99
Merge branch 'feature/newsletter_mail' of github.com:theosli/curator-…
Dec 11, 2024
07f2b74
Manage inscription with an API insead of in webpage component
Loulou5702 Dec 12, 2024
8185ef0
Refactor and translation of comments
Loulou5702 Dec 12, 2024
0631947
Code refactoring for lisibility
Loulou5702 Dec 12, 2024
07cafc2
fix : lack modification in Introduction file
Loulou5702 Dec 12, 2024
894f012
Modification of the welcoming mail content
Loulou5702 Dec 12, 2024
ac3dbd9
feature newsletter mail
Dec 9, 2024
cde99b9
fix module import in newsletters
Dec 9, 2024
04e6bea
[chore] removed unused function
Dec 11, 2024
5041fc1
feature newsletter mail
Dec 9, 2024
d86efe9
Merge branch 'feature/newsletter_mail' of github.com:theosli/curator-…
Dec 12, 2024
ea2b26c
[chore] Update tsconfig.json
theosli Dec 12, 2024
e6fd232
[docs] added README in curator workspace
Dec 12, 2024
ad790ce
New version of the welom email
Loulou5702 Dec 12, 2024
e0e72ac
Welcoming Email content rework
Loulou5702 Dec 12, 2024
a8339f7
Merge pull request #2 from theosli/feature/i18n-fr-en
Loulou5702 Dec 12, 2024
faa90b8
[chore] fix based on PR comments
Dec 12, 2024
1ed3ca3
feature newsletter mail
Dec 9, 2024
e2edd8e
fix module import in newsletters
Dec 9, 2024
e46b4dc
[chore] removed unused function
Dec 11, 2024
434335a
feature newsletter mail
Dec 9, 2024
fe5ebf4
feature newsletter mail
Dec 9, 2024
cbafd44
[chore] removed unused function
Dec 11, 2024
af18826
feature newsletter mail
Dec 9, 2024
b154715
[chore] Update tsconfig.json
theosli Dec 12, 2024
4959963
[docs] added README in curator workspace
Dec 12, 2024
2dd20f0
[chore] fix based on PR comments
Dec 12, 2024
afc2665
Merge branch 'feature/newsletter_mail' of github.com:theosli/curator-…
Dec 13, 2024
edcdf94
Merge branch 'main' of github.com:theosli/curator-ai into feature/new…
Dec 13, 2024
1cea612
[feat] Added form to subscribe on main page
Aurelien-Gindre Dec 5, 2024
19e2759
setup supabase
Dec 5, 2024
51cf779
feature : config supabase subscribers table
Loulou5702 Dec 9, 2024
44da402
fix : english commentary in seed.sql
Loulou5702 Dec 9, 2024
9fe8f75
feature : subscription mechanism working
Loulou5702 Dec 9, 2024
2018b38
feature : sending a basic welcome mail
Loulou5702 Dec 10, 2024
6561ce6
Manage inscription with an API insead of in webpage component
Loulou5702 Dec 12, 2024
1fd9ee1
Refactor and translation of comments
Loulou5702 Dec 12, 2024
6b06e5c
Code refactoring for lisibility
Loulou5702 Dec 12, 2024
f94b910
Modification of the welcoming mail content
Loulou5702 Dec 12, 2024
a4b6cc9
New version of the welom email
Loulou5702 Dec 12, 2024
7599e5f
Welcoming Email content rework
Loulou5702 Dec 12, 2024
9389aa9
Merge branch 'feature/page/subscription' of github.com:theosli/curato…
Aurelien-Gindre Dec 13, 2024
2d58343
[chore] added eslint-react-hooks plugin
Dec 13, 2024
2219ecb
fixing error and implementing dynamic error with I18N
Loulou5702 Dec 13, 2024
a5b87ce
[chore] added prettier with eslint
Jan 9, 2025
c8a24d2
[chore] removed package lock in curator
Jan 9, 2025
f1b701e
[feat] updated subscription methods
Aurelien-Gindre Jan 9, 2025
5c4dccb
[fix] Fixed the email implentation
Aurelien-Gindre Jan 9, 2025
d81a4f9
Merge pull request #7 from theosli/feature/newsletter_mail
benoitchazoule Jan 13, 2025
7aa5927
[chore] changed API to server actions
Jan 16, 2025
2d6ba0f
[chore] transferred mail logic to a template using translation keys
Jan 16, 2025
354b4ad
[feat] base of the conversational agent with interest scrapping
Pierre-Auguste-UL Dec 12, 2024
0d8ad9b
[chore] Reordering the files
Pierre-Auguste-UL Dec 13, 2024
2fdf232
[feat] base of the conversational agent with interest scrapping
Pierre-Auguste-UL Dec 12, 2024
029e19a
[chore] Reordering the files
Pierre-Auguste-UL Dec 13, 2024
02fee76
[fix] issues with the execution of the conversational agent in the pr…
Pierre-Auguste-UL Dec 23, 2024
6170034
[feat] Adding clean to makefile
Pierre-Auguste-UL Dec 23, 2024
085b606
[feat] Adding email reciving and sending
Pierre-Auguste-UL Jan 9, 2025
85413fa
[chore] Renaming .env.sample
Pierre-Auguste-UL Jan 10, 2025
287ad9c
[style] Suppressing comments
Pierre-Auguste-UL Jan 10, 2025
089da94
[refactor] Separating the ngrok server from the conversational agent …
Pierre-Auguste-UL Jan 10, 2025
7ca380a
[chore] Adding a return
Pierre-Auguste-UL Jan 13, 2025
a450945
[refactor] changing notations
Pierre-Auguste-UL Jan 15, 2025
a68b23a
[test] Adding a way to test the interest scrapper without the email
Pierre-Auguste-UL Jan 16, 2025
93ce0a2
[refactor] clarify the mail body declaration
Pierre-Auguste-UL Jan 16, 2025
e5a2400
[refactor] clarify the code
Pierre-Auguste-UL Jan 16, 2025
ec24e5c
[refactor] Updating the response visual
Pierre-Auguste-UL Jan 16, 2025
1904ada
[refactor] better display of the code
Pierre-Auguste-UL Jan 16, 2025
c045055
[refactor] Suppressing unecessary line
Pierre-Auguste-UL Jan 16, 2025
d0306cb
[docs] Adding a template for PRs
Pierre-Auguste-UL Jan 16, 2025
4729ad5
[chore] cleaning the repo
Pierre-Auguste-UL Jan 21, 2025
a1b5e90
Merge pull request #9 from theosli/feature/interest_scrapping
benoitchazoule Jan 22, 2025
185be1a
[chore] removed unused imports
Jan 23, 2025
cbab1e8
[feat] Added form to subscribe on main page
Aurelien-Gindre Dec 5, 2024
68b072f
setup supabase
Dec 5, 2024
293abe2
feature : config supabase subscribers table
Loulou5702 Dec 9, 2024
1ceffc1
fix : english commentary in seed.sql
Loulou5702 Dec 9, 2024
c660dd0
feature : subscription mechanism working
Loulou5702 Dec 9, 2024
ddffcb7
feature : sending a basic welcome mail
Loulou5702 Dec 10, 2024
c660593
Manage inscription with an API insead of in webpage component
Loulou5702 Dec 12, 2024
866473a
Refactor and translation of comments
Loulou5702 Dec 12, 2024
8874c4d
Code refactoring for lisibility
Loulou5702 Dec 12, 2024
ba49be0
Modification of the welcoming mail content
Loulou5702 Dec 12, 2024
2b3bd57
New version of the welom email
Loulou5702 Dec 12, 2024
c50ea7a
Welcoming Email content rework
Loulou5702 Dec 12, 2024
eaa5635
setup supabase
Dec 5, 2024
a67ea87
feature : config supabase subscribers table
Loulou5702 Dec 9, 2024
ab30f1b
fix : english commentary in seed.sql
Loulou5702 Dec 9, 2024
2329a4f
feature : sending a basic welcome mail
Loulou5702 Dec 10, 2024
4db4680
Refactor and translation of comments
Loulou5702 Dec 12, 2024
962daeb
fixing error and implementing dynamic error with I18N
Loulou5702 Dec 13, 2024
e80bd12
[feat] updated subscription methods
Aurelien-Gindre Jan 9, 2025
0f9ab27
[fix] Fixed the email implentation
Aurelien-Gindre Jan 9, 2025
cc78e75
[chore] changed API to server actions
Jan 16, 2025
c065a15
[chore] transferred mail logic to a template using translation keys
Jan 16, 2025
eed8aa0
[chore] removed unused imports
Jan 23, 2025
7f7d5fb
Merge branch 'feature/page/subscription' of github.com:theosli/curato…
Jan 23, 2025
4602e3d
[chore] changed seed to migration
Jan 23, 2025
1e1bac2
[docs] Update README.md
theosli Jan 23, 2025
8ca05e5
[fix] issue on conversational agent
Pierre-Auguste-UL Jan 23, 2025
4f9861b
[refactor] Used string template for the email body
Aurelien-Gindre Jan 23, 2025
5f32b30
Merge branch 'feature/page/subscription' of github.com:theosli/curato…
Aurelien-Gindre Jan 23, 2025
7d37ee1
[chore] remove comments
Pierre-Auguste-UL Jan 24, 2025
6c4db88
Merge branch 'feature/page/subscription' of https://github.com/theosl…
Pierre-Auguste-UL Jan 24, 2025
fda2f01
[chore] moving dependencies
Pierre-Auguste-UL Jan 24, 2025
4751073
[chore] cleaning
Pierre-Auguste-UL Jan 24, 2025
d70c22d
[fix] env variable naming issue
Pierre-Auguste-UL Jan 25, 2025
9248d78
[chore] Deleting a unecessary line
Pierre-Auguste-UL Jan 27, 2025
77ad779
[chore] removing a comment
Pierre-Auguste-UL Feb 3, 2025
213971a
[chore] renaming in camlCase
Pierre-Auguste-UL Feb 3, 2025
d7635e1
[docs] reformatting the README
Pierre-Auguste-UL Feb 3, 2025
79b4246
fix : error console
Loulou5702 Feb 3, 2025
f6eecfe
[feat] Corrected env variable name & added nmp for mails
Aurelien-Gindre Feb 3, 2025
e6c9b76
Merge branch 'feature/page/subscription' of github.com:theosli/curato…
Aurelien-Gindre Feb 3, 2025
1807969
[fix] Fixed error in names
Aurelien-Gindre Feb 3, 2025
d29e6e0
fix : early return
Loulou5702 Feb 3, 2025
c13d33f
[chore] Adding DOMPurify
Pierre-Auguste-UL Feb 3, 2025
a83122d
[chore] Refactoring code
Pierre-Auguste-UL Feb 3, 2025
798d839
[fix] import issues
Pierre-Auguste-UL Feb 3, 2025
03b427c
[fix] error with dompurify
Pierre-Auguste-UL Feb 3, 2025
531fca5
[fix] Fix subscribe service & refactor email service
Aurelien-Gindre Feb 3, 2025
75187e1
[chore] correcting dompurify usage
Pierre-Auguste-UL Feb 3, 2025
790838a
Merge branch 'feature/page/subscription' of https://github.com/theosl…
Pierre-Auguste-UL Feb 3, 2025
938ca88
[fix] type issue
Pierre-Auguste-UL Feb 3, 2025
4469996
[fix] Fixed an asynchroneous function
Aurelien-Gindre Feb 3, 2025
01def81
Merge branch 'feature/page/subscription' of github.com:theosli/curato…
Aurelien-Gindre Feb 3, 2025
03dce64
[chore] Rename newsletterTxtFormat.ts to newsletterFormat.ts
Aurelien-Gindre Feb 3, 2025
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
950 changes: 772 additions & 178 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions supabase/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Supabase
.branches
.temp
.env
275 changes: 275 additions & 0 deletions supabase/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
# For detailed configuration reference documentation, visit:
# https://supabase.com/docs/guides/local-development/cli/config
# A string used to distinguish different Supabase projects on the same host. Defaults to the
# working directory name when running `supabase init`.
project_id = "curator-ai"

[api]
enabled = true
# Port to use for the API URL.
port = 54321
# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
# endpoints. `public` is always included.
schemas = ["public", "graphql_public"]
# Extra schemas to add to the search_path of every request. `public` is always included.
extra_search_path = ["public", "extensions"]
# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
# for accidental or malicious requests.
max_rows = 1000

[api.tls]
enabled = false

[db]
# Port to use for the local database URL.
port = 54322
# Port used by db diff command to initialize the shadow database.
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
major_version = 15

[db.pooler]
enabled = false
# Port to use for the local connection pooler.
port = 54329
# Specifies when a server connection can be reused by other clients.
# Configure one of the supported pooler modes: `transaction`, `session`.
pool_mode = "transaction"
# How many server connections to allow per user/database pair.
default_pool_size = 20
# Maximum number of client connections allowed.
max_client_conn = 100

[db.seed]
# If enabled, seeds the database after migrations during a db reset.
enabled = true
# Specifies an ordered list of seed files to load during db reset.
# Supports glob patterns relative to supabase directory. For example:
# sql_paths = ['./seeds/*.sql', '../project-src/seeds/*-load-testing.sql']
sql_paths = ['./seed.sql']

[realtime]
enabled = true
# Bind realtime via either IPv4 or IPv6. (default: IPv4)
# ip_version = "IPv6"
# The maximum length in bytes of HTTP request headers. (default: 4096)
# max_header_length = 4096

[studio]
enabled = true
# Port to use for Supabase Studio.
port = 54323
# External URL of the API server that frontend connects to.
api_url = "http://127.0.0.1"
# OpenAI API Key to use for Supabase AI in the Supabase Studio.
openai_api_key = "env(OPENAI_API_KEY)"

# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
# are monitored, and you can view the emails that would have been sent from the web interface.
[inbucket]
enabled = true
# Port to use for the email testing server web interface.
port = 54324
# Uncomment to expose additional ports for testing user applications that send emails.
# smtp_port = 54325
# pop3_port = 54326
# admin_email = "[email protected]"
# sender_name = "Admin"

[storage]
enabled = true
# The maximum file size allowed (e.g. "5MB", "500KB").
file_size_limit = "50MiB"

[storage.image_transformation]
enabled = true

# Uncomment to configure local storage buckets
# [storage.buckets.images]
# public = false
# file_size_limit = "50MiB"
# allowed_mime_types = ["image/png", "image/jpeg"]
# objects_path = "./images"

[auth]
enabled = true
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://127.0.0.1:3000"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["https://127.0.0.1:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = true
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
# Requires enable_refresh_token_rotation = true.
refresh_token_reuse_interval = 10
# Allow/disallow new user signups to your project.
enable_signup = true
# Allow/disallow anonymous sign-ins to your project.
enable_anonymous_sign_ins = false
# Allow/disallow testing manual linking of accounts
enable_manual_linking = false
# Passwords shorter than this value will be rejected as weak. Minimum 6, recommended 8 or more.
minimum_password_length = 6
# Passwords that do not meet the following requirements will be rejected as weak. Supported values
# are: `letters_digits`, `lower_upper_letters_digits`, `lower_upper_letters_digits_symbols`
password_requirements = ""

[auth.email]
# Allow/disallow new user signups via email to your project.
enable_signup = true
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = true
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false
# If enabled, users will need to reauthenticate or have logged in recently to change their password.
secure_password_change = false
# Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email.
max_frequency = "1s"
# Number of characters used in the email OTP.
otp_length = 6
# Number of seconds before the email OTP expires (defaults to 1 hour).
otp_expiry = 3600

# Use a production-ready SMTP server
# [auth.email.smtp]
# host = "smtp.sendgrid.net"
# port = 587
# user = "apikey"
# pass = "env(SENDGRID_API_KEY)"
# admin_email = "[email protected]"
# sender_name = "Admin"

# Uncomment to customize email template
# [auth.email.template.invite]
# subject = "You have been invited"
# content_path = "./supabase/templates/invite.html"

[auth.sms]
# Allow/disallow new user signups via SMS to your project.
enable_signup = false
# If enabled, users need to confirm their phone number before signing in.
enable_confirmations = false
# Template for sending OTP to users
template = "Your code is {{ .Code }}"
# Controls the minimum amount of time that must pass before sending another sms otp.
max_frequency = "5s"

# Use pre-defined map of phone number to OTP for testing.
# [auth.sms.test_otp]
# 4152127777 = "123456"

# Configure logged in session timeouts.
# [auth.sessions]
# Force log out after the specified duration.
# timebox = "24h"
# Force log out if the user has been inactive longer than the specified duration.
# inactivity_timeout = "8h"

# This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
# [auth.hook.custom_access_token]
# enabled = true
# uri = "pg-functions://<database>/<schema>/<hook_name>"

# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
[auth.sms.twilio]
enabled = false
account_sid = ""
message_service_sid = ""
# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"

[auth.mfa]
# Control how many MFA factors can be enrolled at once per user.
max_enrolled_factors = 10

# Control use of MFA via App Authenticator (TOTP)
[auth.mfa.totp]
enroll_enabled = true
verify_enabled = true

# Configure Multi-factor-authentication via Phone Messaging
[auth.mfa.phone]
enroll_enabled = false
verify_enabled = false
otp_length = 6
template = "Your code is {{ .Code }}"
max_frequency = "5s"

# Configure Multi-factor-authentication via WebAuthn
# [auth.mfa.web_authn]
# enroll_enabled = true
# verify_enabled = true

# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
# `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`,
# `twitter`, `slack`, `spotify`, `workos`, `zoom`.
[auth.external.apple]
enabled = false
client_id = ""
# DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
# Overrides the default auth redirectUrl.
redirect_uri = ""
# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
# or any other third-party OIDC providers.
url = ""
# If enabled, the nonce check will be skipped. Required for local sign in with Google auth.
skip_nonce_check = false

# Use Firebase Auth as a third-party provider alongside Supabase Auth.
[auth.third_party.firebase]
enabled = false
# project_id = "my-firebase-project"

# Use Auth0 as a third-party provider alongside Supabase Auth.
[auth.third_party.auth0]
enabled = false
# tenant = "my-auth0-tenant"
# tenant_region = "us"

# Use AWS Cognito (Amplify) as a third-party provider alongside Supabase Auth.
[auth.third_party.aws_cognito]
enabled = false
# user_pool_id = "my-user-pool-id"
# user_pool_region = "us-east-1"

[edge_runtime]
enabled = true
# Configure one of the supported request policies: `oneshot`, `per_worker`.
# Use `oneshot` for hot reload, or `per_worker` for load testing.
policy = "oneshot"
# Port to attach the Chrome inspector for debugging edge functions.
inspector_port = 8083

# Use these configurations to customize your Edge Function.
# [functions.MY_FUNCTION_NAME]
# enabled = true
# verify_jwt = true
# import_map = "./functions/MY_FUNCTION_NAME/deno.json"
# Uncomment to specify a custom file path to the entrypoint.
# Supported file extensions are: .ts, .js, .mjs, .jsx, .tsx
# entrypoint = "./functions/MY_FUNCTION_NAME/index.ts"

[analytics]
enabled = true
port = 54327
# Configure one of the supported backends: `postgres`, `bigquery`.
backend = "postgres"

# Experimental features may be deprecated any time
[experimental]
# Configures Postgres storage engine to use OrioleDB (S3)
orioledb_version = ""
# Configures S3 bucket URL, eg. <bucket_name>.s3-<region>.amazonaws.com
s3_host = "env(S3_HOST)"
# Configures S3 bucket region, eg. us-east-1
s3_region = "env(S3_REGION)"
# Configures AWS_ACCESS_KEY_ID for S3 bucket
s3_access_key = "env(S3_ACCESS_KEY)"
# Configures AWS_SECRET_ACCESS_KEY for S3 bucket
s3_secret_key = "env(S3_SECRET_KEY)"
6 changes: 6 additions & 0 deletions supabase/seed.sql
Loulou5702 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- creation of the table subscribers
CREATE TABLE IF NOT EXISTS Subscribers (
id SERIAL PRIMARY KEY, -- unique id, auto-incremented
user_email VARCHAR(255) UNIQUE NOT NULL, -- unique email of the user, mendatory
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP -- date of subscription, default : nowaday
);
Loading