diff --git a/.ai/tech-stack.md b/.ai/tech-stack.md index 1561b64..eb791a4 100644 --- a/.ai/tech-stack.md +++ b/.ai/tech-stack.md @@ -19,6 +19,7 @@ AI - Komunikacja z modelami przez usługę Openrouter.ai: CI/CD i Hosting: - Github Actions do tworzenia pipeline'ów CI/CD +- Cloudflare Pages do hostingu - workflow `master.yml` Testing: diff --git a/.cursor/rules/astro.mdc b/.cursor/rules/astro.mdc new file mode 100644 index 0000000..83b61ff --- /dev/null +++ b/.cursor/rules/astro.mdc @@ -0,0 +1,18 @@ +--- +description: Building server-side Astro pages +globs: +alwaysApply: false +--- +### Guidelines for Astro + +- Use content collections with type safety for blog posts, documentation, etc. +- Leverage Server Endpoints for API routes +- Use POST, GET - uppercase format for endpoint handlers +- Use `export const prerender = false` for API routes +- Use zod for input validation in API routes +- Implement or reuse middleware for request/response modification +- Use image optimization with the Astro Image integration +- Implement hybrid rendering with server-side rendering where needed +- Use Astro.cookies for server-side cookie management +- Leverage import.meta.env for environment variables +- Always check if you're asked to create public or private pages (if public, update `src/middleware/index.ts`) to allow non-auth browsing \ No newline at end of file diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 9066da0..992c5bd 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -68,11 +68,10 @@ jobs: - name: Build Astro site env: - # Environment variables needed for the build process - # These should be configured as secrets in the 'production' environment on GitHub PUBLIC_ENV_NAME: ${{ secrets.PUBLIC_ENV_NAME }} SUPABASE_URL: ${{ secrets.SUPABASE_URL }} SUPABASE_PUBLIC_KEY: ${{ secrets.SUPABASE_PUBLIC_KEY }} + SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} run: npm run build - name: Deploy to Cloudflare Pages diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 71a469c..9a7b4bf 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -78,6 +78,7 @@ jobs: echo "PUBLIC_ENV_NAME=${{ secrets.PUBLIC_ENV_NAME }}" > .env.integration echo "SUPABASE_URL=${{ secrets.SUPABASE_URL }}" >> .env.integration echo "SUPABASE_PUBLIC_KEY=${{ secrets.SUPABASE_PUBLIC_KEY }}" >> .env.integration + echo "SUPABASE_SERVICE_ROLE_KEY=${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}" >> .env.integration echo "E2E_USERNAME_ID=${{ secrets.E2E_USERNAME_ID }}" >> .env.integration echo "E2E_USERNAME=${{ secrets.E2E_USERNAME }}" >> .env.integration echo "E2E_PASSWORD=${{ secrets.E2E_PASSWORD }}" >> .env.integration diff --git a/astro.config.mjs b/astro.config.mjs index f2eed6c..1e8cdac 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -14,6 +14,7 @@ export default defineConfig({ schema: { SUPABASE_URL: envField.string({ context: 'server', access: 'secret' }), SUPABASE_PUBLIC_KEY: envField.string({ context: 'server', access: 'secret' }), + SUPABASE_SERVICE_ROLE_KEY: envField.string({ context: 'server', access: 'secret' }), }, }, vite: { diff --git a/package-lock.json b/package-lock.json index e53e4f3..0b98654 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ }, "devDependencies": { "@playwright/test": "1.51.1", + "@tailwindcss/typography": "0.5.16", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.2.0", @@ -1662,6 +1663,36 @@ "node": ">= 10" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.16.tgz", + "integrity": "sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" + } + }, + "node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@tailwindcss/vite": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.0.14.tgz", @@ -5753,6 +5784,20 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", diff --git a/package.json b/package.json index 79099ee..ad2281c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "version": "0.0.1", "scripts": { - "dev": "astro dev", + "dev": "astro dev -- --mode local", "dev:e2e": "npm run astro dev -- --mode integration", "build": "astro build", "preview": "astro preview", @@ -44,6 +44,7 @@ }, "devDependencies": { "@playwright/test": "1.51.1", + "@tailwindcss/typography": "0.5.16", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.2.0", diff --git a/src/assets/privacy-policy/pp-13-04-2025-en.md b/src/assets/privacy-policy/pp-13-04-2025-en.md new file mode 100644 index 0000000..fceddbd --- /dev/null +++ b/src/assets/privacy-policy/pp-13-04-2025-en.md @@ -0,0 +1,108 @@ +# Privacy Policy – 10xRules.ai + +**Last updated:** April 13, 2025 + +## 1. Data Controller + +The data controller is the Przeprogramowani team (Przemek Smyrdek and Marcin Czarkowski), responsible for the development of the "10xRules.ai" application, based in Poland. + +You can contact the Data Controller at: kontakt@przeprogramowani.pl + +## 2. Scope of Collected Data + +As part of using the 10xRules.ai application, we collect the following data: + +- Basic user profile: email address +- Encrypted password (managed by Supabase Auth) + +## 3. Legal Basis for Processing + +The processing of personal data takes place on the basis of: + +- Article 6(1)(b) GDPR – processing is necessary for the performance of a contract to which the data subject is party (using the 10xRules.ai application constitutes entering into an agreement for the provision of electronic services) +- Article 6(1)(f) GDPR – processing is necessary for the purposes of the legitimate interests pursued by the controller (ensuring the security and functionality of the application) + +## 4. Purposes of Data Processing + +Personal data is processed for the purpose of: + +- Enabling registration and login to the 10xRules.ai application +- Ensuring the proper functioning of all application features +- Ensuring security of application usage +- Contact regarding technical matters and handling user requests + +## 5. Optional Account Creation + +Creating an account in the 10xRules.ai application is completely optional. The application offers a basic range of functions without the need for registration. However, creating a user account provides access to additional functionalities: + +- Creating and managing your own collections of rules +- Personalization of existing rules +- Saving user preferences + +By creating an account, the user consents to the processing of their data in accordance with this Privacy Policy. + +## 6. Method and Location of Processing + +- The application is hosted on Cloudflare infrastructure, which may use servers in various locations, including outside the European Economic Area. +- Data is stored in the Supabase database located in the eu-central-1 region (Frankfurt, Germany), which means that the main user data remains within the European Union. + +## 7. Data Retention Period + +Users' personal data is stored for the period of having an active account in the 10xRules.ai application. After deleting the account, the data is permanently removed from our systems, with the exception of data that may be stored longer due to applicable law (e.g., billing data). + +## 8. Data Recipients + +User data is not shared with any external companies besides the service providers necessary for the application to function: + +- Supabase – provider of database and authentication services +- Cloudflare – provider of hosting and security services + +The listed service providers have access to user data only to the extent necessary to provide their services and are subject to appropriate data protection obligations. + +## 9. Transfer of Data to Third Countries + +In connection with the use of Cloudflare services, some data may be processed on servers located outside the European Economic Area (EEA). In such cases, we ensure that data transfer takes place with appropriate safeguards, such as standard contractual clauses approved by the European Commission. + +## 10. Cookies and Other Tracking Technologies + +The 10xRules.ai application uses basic cookies necessary for the proper functioning of the application, in particular for managing user sessions and ensuring security. These cookies are necessary for using the application and do not require separate user consent in accordance with legal regulations. + +## 11. Automated Decision-Making and Profiling + +The 10xRules.ai application does not use automated decision-making or profiling within the meaning of GDPR. + +## 12. User Rights + +Each user has the following rights: + +- Right of access to their personal data +- Right to rectification (correction) of their data +- Right to erasure of data (right to be forgotten) +- Right to restriction of processing +- Right to data portability +- Right to object to the processing of data +- Right to withdraw consent at any time, if processing is based on consent +- Right to lodge a complaint with a supervisory authority (President of the Personal Data Protection Office) + +To exercise the above rights, please contact us at: kontakt@przeprogramowani.pl + +To delete your account, please send a message to kontakt@przeprogramowani.pl with a request to delete the account. + +## 13. Security + +We make every effort to secure user data by using, among others: + +- Password encryption (we never store passwords in plain text) +- Security measures offered by Cloudflare and Supabase platforms +- Connection encryption using HTTPS protocol +- Regular security updates + +## 14. Changes to the Privacy Policy + +The Controller reserves the right to make changes to the Privacy Policy. Users will be informed of any changes via email associated with the user's account. Continued use of the application after the changes have been made constitutes acceptance of the new version of the Privacy Policy. + +## 15. Final Provisions + +- The application may contain links to external websites or services; we are not responsible for their privacy policies. +- By using the 10xRules.ai application, the user accepts this Privacy Policy. +- In matters not regulated by this Privacy Policy, the relevant provisions of law shall apply, in particular Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 (GDPR). diff --git a/src/assets/privacy-policy/pp-13-04-2025-pl.md b/src/assets/privacy-policy/pp-13-04-2025-pl.md new file mode 100644 index 0000000..156d969 --- /dev/null +++ b/src/assets/privacy-policy/pp-13-04-2025-pl.md @@ -0,0 +1,108 @@ +# Polityka Prywatności – 10xRules.ai + +**Data ostatniej aktualizacji:** 13 kwietnia 2025 + +## 1. Administrator Danych + +Administratorem danych osobowych jest zespół Przeprogramowani (Przemek Smyrdek i Marcin Czarkowski), odpowiedzialny za rozwój aplikacji „10xRules.ai", z siedzibą w Polsce. + +Kontakt z Administratorem możliwy jest pod adresem e-mail: kontakt@przeprogramowani.pl + +## 2. Zakres Gromadzonych Danych + +W ramach korzystania z aplikacji 10xRules.ai gromadzimy następujące dane: + +- Podstawowy profil użytkownika: adres e-mail +- Zaszyfrowane hasło (zarządzane przez Supabase Auth) + +## 3. Podstawa Prawna Przetwarzania + +Przetwarzanie danych osobowych odbywa się na podstawie: + +- Art. 6 ust. 1 lit. b RODO – przetwarzanie jest niezbędne do wykonania umowy, której stroną jest osoba, której dane dotyczą (korzystanie z aplikacji 10xRules.ai stanowi zawarcie umowy o świadczenie usług drogą elektroniczną) +- Art. 6 ust. 1 lit. f RODO – przetwarzanie jest niezbędne do celów wynikających z prawnie uzasadnionych interesów realizowanych przez administratora (zapewnienie bezpieczeństwa i funkcjonalności aplikacji) + +## 4. Cele Przetwarzania Danych + +Dane osobowe są przetwarzane w celu: + +- Umożliwienia rejestracji i logowania do aplikacji 10xRules.ai +- Zapewnienia prawidłowego funkcjonowania wszystkich funkcji aplikacji +- Zapewnienia bezpieczeństwa korzystania z aplikacji +- Kontaktu w sprawach technicznych i obsługi zgłoszeń użytkowników + +## 5. Opcjonalność Posiadania Konta + +Zakładanie konta w aplikacji 10xRules.ai jest całkowicie opcjonalne. Aplikacja oferuje podstawowy zakres funkcji bez konieczności rejestracji. Jednakże utworzenie konta użytkownika zapewnia dostęp do dodatkowych funkcjonalności: + +- Tworzenie i zarządzanie własnymi kolekcjami reguł +- Personalizacja istniejących reguł +- Zapisywanie preferencji użytkownika + +Decydując się na założenie konta, użytkownik wyraża zgodę na przetwarzanie swoich danych zgodnie z niniejszą Polityką Prywatności. + +## 6. Sposób i Miejsce Przetwarzania + +- Aplikacja jest hostowana na infrastrukturze Cloudflare, która może wykorzystywać serwery w różnych lokalizacjach, w tym poza Europejskim Obszarem Gospodarczym. +- Dane przechowywane są w bazie Supabase zlokalizowanej w regionie eu-central-1 (Frankfurt, Niemcy), co oznacza, że główne dane użytkowników pozostają na terenie Unii Europejskiej. + +## 7. Okres Przechowywania Danych + +Dane osobowe użytkowników są przechowywane przez okres posiadania aktywnego konta w aplikacji 10xRules.ai. Po usunięciu konta dane są trwale usuwane z naszych systemów, z zastrzeżeniem danych, które mogą być przechowywane dłużej ze względu na obowiązujące przepisy prawa (np. dane rozliczeniowe). + +## 8. Odbiorcy Danych + +Dane użytkowników nie są udostępniane żadnym firmom zewnętrznym poza dostawcami usług niezbędnych do funkcjonowania aplikacji: + +- Supabase – dostawca usług bazodanowych i uwierzytelniania +- Cloudflare – dostawca usług hostingowych i zabezpieczających + +Wymienieni dostawcy usług mają dostęp do danych użytkowników wyłącznie w zakresie niezbędnym do świadczenia swoich usług i podlegają odpowiednim zobowiązaniom dotyczącym ochrony danych. + +## 9. Przekazywanie Danych do Państw Trzecich + +W związku z korzystaniem z usług Cloudflare, niektóre dane mogą być przetwarzane na serwerach zlokalizowanych poza Europejskim Obszarem Gospodarczym (EOG). W takich przypadkach zapewniamy, że transfer danych odbywa się z zachowaniem odpowiednich zabezpieczeń, takich jak standardowe klauzule umowne zatwierdzone przez Komisję Europejską. + +## 10. Pliki Cookie i Inne Technologie Śledzenia + +Aplikacja 10xRules.ai wykorzystuje podstawowe pliki cookie niezbędne do prawidłowego funkcjonowania aplikacji, w szczególności do zarządzania sesją użytkownika i zapewnienia bezpieczeństwa. Pliki te są niezbędne do korzystania z aplikacji i nie wymagają osobnej zgody użytkownika zgodnie z przepisami prawa. + +## 11. Zautomatyzowane Podejmowanie Decyzji i Profilowanie + +Aplikacja 10xRules.ai nie wykorzystuje zautomatyzowanego podejmowania decyzji ani profilowania w rozumieniu RODO. + +## 12. Prawa Użytkownika + +Każdemu użytkownikowi przysługują następujące prawa: + +- Prawo dostępu do swoich danych osobowych +- Prawo do sprostowania (poprawiania) swoich danych +- Prawo do usunięcia danych (prawo do bycia zapomnianym) +- Prawo do ograniczenia przetwarzania danych +- Prawo do przenoszenia danych +- Prawo do sprzeciwu wobec przetwarzania danych +- Prawo do cofnięcia zgody w dowolnym momencie, jeżeli przetwarzanie odbywa się na podstawie zgody +- Prawo do wniesienia skargi do organu nadzorczego (Prezes Urzędu Ochrony Danych Osobowych) + +W celu realizacji powyższych praw, prosimy o kontakt pod adresem: kontakt@przeprogramowani.pl + +W celu usunięcia konta należy wysłać wiadomość na adres kontakt@przeprogramowani.pl z prośbą o usunięcie konta. + +## 13. Bezpieczeństwo + +Dokładamy wszelkich starań, aby zabezpieczyć dane użytkowników, stosując m.in.: + +- Szyfrowanie haseł (nigdy nie przechowujemy haseł w formie jawnej) +- Zabezpieczenia oferowane przez platformy Cloudflare i Supabase +- Szyfrowanie połączeń za pomocą protokołu HTTPS +- Regularne aktualizacje zabezpieczeń + +## 14. Zmiany Polityki Prywatności + +Administrator zastrzega sobie prawo do wprowadzania zmian w Polityce Prywatności. O wszelkich zmianach użytkownicy będą informowani za pośrednictwem wiadomości e-mail przypisanej do konta użytkownika. Korzystanie z aplikacji po wprowadzeniu zmian jest równoznaczne z akceptacją nowej wersji Polityki Prywatności. + +## 15. Postanowienia Końcowe + +- Aplikacja może zawierać linki do zewnętrznych stron lub usług; nie ponosimy odpowiedzialności za ich polityki prywatności. +- Korzystając z aplikacji 10xRules.ai, użytkownik akceptuje niniejszą Politykę Prywatności. +- W sprawach nieuregulowanych niniejszą Polityką Prywatności zastosowanie mają odpowiednie przepisy prawa, w szczególności Rozporządzenie Parlamentu Europejskiego i Rady (UE) 2016/679 z dnia 27 kwietnia 2016 r. (RODO). diff --git a/src/components/auth/SignupForm.tsx b/src/components/auth/SignupForm.tsx index 61f38b9..1090f6c 100644 --- a/src/components/auth/SignupForm.tsx +++ b/src/components/auth/SignupForm.tsx @@ -83,6 +83,36 @@ export const SignupForm: React.FC = () => { {...register('confirmPassword')} /> +
+
+
+ +
+
+ + {errors.privacyPolicyConsent && ( +

{errors.privacyPolicyConsent.message}

+ )} +
+
+
+