Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PAYMENT_PROVIDER=stripe
PAYMENT_MODE=test
PAYMENT_PUBLIC_KEY=
PAYMENT_SECRET_KEY=
PAYMENT_WEBHOOK_SECRET=
PAYMENT_SUCCESS_URL=https://example.com/scifi-ui/payment/success.html
PAYMENT_CANCEL_URL=https://example.com/scifi-ui/payment/cancel.html
FRONTEND_URL=https://example.com
WORKER_BASE_URL=https://api.example.com
SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
LICENSE_SECRET=
LICENSE_ISSUER=FormatX Suite Pro
SUPPORT_EMAIL=
ADMIN_DEBUG_TOKEN=
TERMS_URL=https://example.com/scifi-ui/terms.html
PRIVACY_URL=https://example.com/scifi-ui/privacy.html
STRIPE_PRICE_ID_BUSINESS_LITE_MONTHLY=
STRIPE_PRICE_ID_BUSINESS_LITE_ANNUAL=
STRIPE_PRICE_ID_BUSINESS_PRO_MONTHLY=
STRIPE_PRICE_ID_BUSINESS_PRO_ANNUAL=
STRIPE_PRICE_ID_TECHNICIAN_TEAM_MONTHLY=
STRIPE_PRICE_ID_TECHNICIAN_TEAM_ANNUAL=
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,10 @@ MigrationBackup/
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd
# Billing environment files
.env
.env.*
!.env.example
billing-worker/.dev.vars
billing-worker/.wrangler/
2,727 changes: 2,727 additions & 0 deletions .lighthouseci/lhr-1778368118126.html

Large diffs are not rendered by default.

8,461 changes: 8,461 additions & 0 deletions .lighthouseci/lhr-1778368118126.json

Large diffs are not rendered by default.

2,727 changes: 2,727 additions & 0 deletions .lighthouseci/lhr-1778368129591.html

Large diffs are not rendered by default.

8,455 changes: 8,455 additions & 0 deletions .lighthouseci/lhr-1778368129591.json

Large diffs are not rendered by default.

2,727 changes: 2,727 additions & 0 deletions .lighthouseci/lhr-1778368140669.html

Large diffs are not rendered by default.

8,385 changes: 8,385 additions & 0 deletions .lighthouseci/lhr-1778368140669.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion FormatX.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11018.127 d18.0
VisualStudioVersion = 18.0.11018.127
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormatX", "FormatX.csproj", "{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}"
EndProject
Expand All @@ -10,9 +10,11 @@ Global
Debug|arm64 = Debug|arm64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Debug|Any CPU = Debug|Any CPU
Release|arm64 = Release|arm64
Release|x64 = Release|x64
Release|x86 = Release|x86
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Debug|arm64.ActiveCfg = Debug|arm64
Expand All @@ -21,12 +23,16 @@ Global
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Debug|x64.Build.0 = Debug|x64
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Debug|x86.ActiveCfg = Debug|x86
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Debug|x86.Build.0 = Debug|x86
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|arm64.ActiveCfg = Release|arm64
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|arm64.Build.0 = Release|arm64
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|x64.ActiveCfg = Release|x64
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|x64.Build.0 = Release|x64
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|x86.ActiveCfg = Release|x86
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|x86.Build.0 = Release|x86
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAE2A34D-2FFB-587E-DE2C-001EB4D3C373}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
23 changes: 23 additions & 0 deletions billing-worker/.dev.vars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PAYMENT_PROVIDER=stripe
PAYMENT_MODE=test
PAYMENT_PUBLIC_KEY=
PAYMENT_SECRET_KEY=
PAYMENT_WEBHOOK_SECRET=
PAYMENT_SUCCESS_URL=http://localhost:8000/scifi-ui/payment/success.html
PAYMENT_CANCEL_URL=http://localhost:8000/scifi-ui/payment/cancel.html
FRONTEND_URL=http://localhost:8000
WORKER_BASE_URL=http://127.0.0.1:8787
SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
LICENSE_SECRET=change-me
LICENSE_ISSUER=FormatX Suite Pro
SUPPORT_EMAIL=
ADMIN_DEBUG_TOKEN=
TERMS_URL=http://localhost:8000/scifi-ui/terms.html
PRIVACY_URL=http://localhost:8000/scifi-ui/privacy.html
STRIPE_PRICE_ID_BUSINESS_LITE_MONTHLY=
STRIPE_PRICE_ID_BUSINESS_LITE_ANNUAL=
STRIPE_PRICE_ID_BUSINESS_PRO_MONTHLY=
STRIPE_PRICE_ID_BUSINESS_PRO_ANNUAL=
STRIPE_PRICE_ID_TECHNICIAN_TEAM_MONTHLY=
STRIPE_PRICE_ID_TECHNICIAN_TEAM_ANNUAL=
12 changes: 12 additions & 0 deletions billing-worker/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
167 changes: 167 additions & 0 deletions billing-worker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*

# wrangler project

.dev.vars*
!.dev.vars.example
.env*
!.env.example
.wrangler/
6 changes: 6 additions & 0 deletions billing-worker/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true
}
5 changes: 5 additions & 0 deletions billing-worker/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"wrangler.json": "jsonc"
}
}
41 changes: 41 additions & 0 deletions billing-worker/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Cloudflare Workers

STOP. Your knowledge of Cloudflare Workers APIs and limits may be outdated. Always retrieve current documentation before any Workers, KV, R2, D1, Durable Objects, Queues, Vectorize, AI, or Agents SDK task.

## Docs

- https://developers.cloudflare.com/workers/
- MCP: `https://docs.mcp.cloudflare.com/mcp`

For all limits and quotas, retrieve from the product's `/platform/limits/` page. eg. `/workers/platform/limits`

## Commands

| Command | Purpose |
|---------|---------|
| `npx wrangler dev` | Local development |
| `npx wrangler deploy` | Deploy to Cloudflare |
| `npx wrangler types` | Generate TypeScript types |

Run `wrangler types` after changing bindings in wrangler.jsonc.

## Node.js Compatibility

https://developers.cloudflare.com/workers/runtime-apis/nodejs/

## Errors

- **Error 1102** (CPU/Memory exceeded): Retrieve limits from `/workers/platform/limits/`
- **All errors**: https://developers.cloudflare.com/workers/observability/errors/

## Product Docs

Retrieve API references and limits from:
`/kv/` · `/r2/` · `/d1/` · `/durable-objects/` · `/queues/` · `/vectorize/` · `/workers-ai/` · `/agents/`

## Best Practices (conditional)

If the application uses Durable Objects or Workflows, refer to the relevant best practices:

- Durable Objects: https://developers.cloudflare.com/durable-objects/best-practices/rules-of-durable-objects/
- Workflows: https://developers.cloudflare.com/workflows/build/rules-of-workflows/
21 changes: 21 additions & 0 deletions billing-worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# FormatX Billing Worker

Cloudflare Worker API a GitHub Pages alapú FormatX Suite Pro checkout flow-hoz.

## Végpontok

- `POST /api/create-checkout-session`
- `POST /api/webhook`
- `GET /api/session-status?session_id=...`
- `POST /api/license/verify`
- `GET /api/admin/debug`

## Supabase

A szükséges táblaséma a `supabase-schema.sql` fájlban található.

## Lokális fejlesztés

1. Másold a `.dev.vars.example` fájlt `.dev.vars` néven.
2. Töltsd ki a Stripe / Supabase / licenc változókat.
3. Futtasd: `npm run dev`
Loading
Loading