Skip to content

Commit 961709a

Browse files
committed
refactor: update domain from convert2doc/coldfollow to qrypt.chat across config files and endpoints
1 parent 2f92ec2 commit 961709a

File tree

4 files changed

+86
-20
lines changed

4 files changed

+86
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@ jobs:
100100
DEPLOY_REMOTE_HOST: 104.36.23.197
101101
DEPLOY_REMOTE_PORT: 2048
102102
DEPLOY_REMOTE_USER: ubuntu
103-
DEPLOY_REMOTE_DIR: www/coldfollow.com/coldfollow-web
103+
DEPLOY_REMOTE_DIR: www/qrypt.chat/qryptchat-web
104104
INSTALL_SERVICE: true

etc/qrypt.chat.conf

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
####################################################
2+
# qrypt.chat #
3+
####################################################
4+
5+
server {
6+
listen [::]:80;
7+
listen 80;
8+
server_name qrypt.chat www.qrypt.chat;
9+
return 301 https://qrypt.chat$request_uri;
10+
}
11+
12+
server {
13+
listen [::]:443 ssl http2;
14+
listen 443 ssl http2;
15+
server_name www.qrypt.chat;
16+
return 301 https://qrypt.chat$request_uri;
17+
}
18+
19+
server {
20+
server_name qrypt.chat;
21+
#index index.html;
22+
#root /home/ubuntu/www/chat.profullstack.com/chat.profullstack-ui/build;
23+
24+
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
25+
add_header 'Last-Modified' '';
26+
if_modified_since off;
27+
expires -1;
28+
etag off;
29+
30+
# listen [::]:443 ssl http2; #managed by Certbot
31+
# listen 443 ssl http2; #managed by Certbot
32+
# ssl_certificate /etc/letsencrypt/live/qrypt.chat/fullchain.pem; #managed by Certbot
33+
# ssl_certificate_key /etc/letsencrypt/live/qrypt.chat/privkey.pem; # managed by Certbot
34+
# include /etc/letsencrypt/options-ssl-nginx.conf; #managed by Certbot
35+
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; #managed by Certbot
36+
# ssl_protocols TLSv1.2;
37+
38+
#try_files $uri $uri/ /index.html;
39+
client_max_body_size 1000M;
40+
#rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
41+
#rewrite ^/(.*)/$ /$1 permanent;
42+
# try_files $uri/index.html $uri.html $uri/ $uri =404;
43+
44+
client_body_timeout 600s;
45+
client_header_timeout 600s;
46+
keepalive_timeout 600s;
47+
send_timeout 600s;
48+
49+
location / {
50+
proxy_pass http://localhost:8098;
51+
proxy_http_version 1.1;
52+
proxy_set_header Upgrade $http_upgrade;
53+
proxy_set_header Connection 'upgrade';
54+
proxy_cache_bypass $http_upgrade;
55+
proxy_set_header Host $host;
56+
proxy_set_header X-Real-IP $remote_addr;
57+
proxy_set_header X-Forwarded-Proto https;
58+
proxy_set_header X-Forwarded-For $remote_addr;
59+
60+
# Increase proxy timeouts
61+
proxy_connect_timeout 600s;
62+
proxy_send_timeout 600s;
63+
proxy_read_timeout 600s;
64+
send_timeout 600s;
65+
66+
# Optional: Increase buffer sizes
67+
proxy_buffer_size 128k;
68+
proxy_buffers 4 256k;
69+
proxy_busy_buffers_size 256k;
70+
71+
# Optional: Disable buffering
72+
proxy_buffering off;
73+
}
74+
}

src/index.js

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ app.post('/api/stripe-simple/create-checkout', async (c) => {
130130
},
131131
body: new URLSearchParams({
132132
'mode': 'subscription',
133-
'success_url': 'https://convert2doc.com/dashboard?success=true',
134-
'cancel_url': 'https://convert2doc.com/register?canceled=true',
133+
'success_url': 'https://qrypt.chat/dashboard?success=true',
134+
'cancel_url': 'https://qrypt.chat/register?canceled=true',
135135
'customer_email': email, // Pre-fill customer email in checkout
136136
'line_items[0][price]': priceId,
137137
'line_items[0][quantity]': '1'
@@ -178,8 +178,8 @@ app.post('/api/stripe-direct/create-checkout', async (c) => {
178178
// Directly create session with minimal params
179179
const session = await stripeDirectClient.checkout.sessions.create({
180180
mode: 'subscription',
181-
success_url: 'https://convert2doc.com/dashboard?success=true',
182-
cancel_url: 'https://convert2doc.com/register?canceled=true',
181+
success_url: 'https://qrypt.chat/dashboard?success=true',
182+
cancel_url: 'https://qrypt.chat/register?canceled=true',
183183
customer_email: email, // Pre-fill customer email in checkout
184184
line_items: [{ price: priceId, quantity: 1 }]
185185
});
@@ -216,7 +216,7 @@ app.get('/', async (c) => {
216216
// Otherwise, return a JSON response
217217
return c.json({
218218
status: 'ok',
219-
message: 'Document generation service is running',
219+
message: 'E2E encrypted chat service is running',
220220
version: process.env.npm_package_version || '1.0.0'
221221
});
222222
});
@@ -290,14 +290,9 @@ const startServer = (portToUse) => {
290290
}, (info) => {
291291
console.log(`Server running at http://localhost:${info.port}`);
292292
console.log('Available endpoints:');
293-
console.log(`- HTML to PDF: http://localhost:${info.port}/api/1/html-to-pdf`);
294-
console.log(`- HTML to DOC: http://localhost:${info.port}/api/1/html-to-doc`);
295-
console.log(`- HTML to Excel: http://localhost:${info.port}/api/1/html-to-excel`);
296-
console.log(`- HTML to PowerPoint: http://localhost:${info.port}/api/1/html-to-ppt`);
297-
console.log(`- HTML to EPUB: http://localhost:${info.port}/api/1/html-to-epub`);
298-
console.log(`- HTML to Markdown: http://localhost:${info.port}/api/1/html-to-markdown`);
299-
console.log(`- Markdown to HTML: http://localhost:${info.port}/api/1/markdown-to-html`);
300-
console.log(`- Document History: http://localhost:${info.port}/api/1/document-history`);
293+
console.log(`- WebSocket: http://localhost:${info.port}/api/1/ws`);
294+
console.log(`- Chat API: http://localhost:${info.port}/api/1/chat`);
295+
console.log(`- Chat UI: http://localhost:${info.port}/chat`);
301296
console.log(`- Subscription: http://localhost:${info.port}/api/1/subscription`);
302297
console.log(`- Subscription Status: http://localhost:${info.port}/api/1/subscription-status`);
303298
console.log(`- Stripe Checkout: http://localhost:${info.port}/api/1/payments/stripe/create-checkout-session`);
@@ -306,9 +301,6 @@ const startServer = (portToUse) => {
306301
console.log(`- Stripe Cancel: http://localhost:${info.port}/api/1/payments/stripe/cancel-subscription`);
307302
console.log(`- Payment Callback: http://localhost:${info.port}/api/1/payments/cryptapi/callback`);
308303
console.log(`- Payment Logs: http://localhost:${info.port}/api/1/payments/cryptapi/logs`);
309-
console.log(`- WebSocket: http://localhost:${info.port}/api/1/ws`);
310-
console.log(`- Chat API: http://localhost:${info.port}/api/1/chat`);
311-
console.log(`- Chat UI: http://localhost:${info.port}/chat`);
312304
console.log(`- Web interface: http://localhost:${info.port}`);
313305

314306
// Create a separate WebSocket server on a different port

supabase/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# A string used to distinguish different Supabase projects on the same host. Defaults to the working
22
# directory name when running `supabase init`.
3-
project_id = "bqvvdyaodxojwuudigna"
3+
project_id = "yjvasmekpgkkguoeucfe"
44

55
[api]
66
# Port to use for the API URL.
@@ -28,9 +28,9 @@ port = 54323
2828
[auth]
2929
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
3030
# in emails.
31-
site_url = "https://coldfollow.com"
31+
site_url = "https://qrypt.chat"
3232
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
33-
additional_redirect_urls = ["https://coldfollow.com"]
33+
additional_redirect_urls = ["https://qrypt.chat"]
3434
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (1
3535
# week).
3636
jwt_expiry = 3600

0 commit comments

Comments
 (0)