Adding Stripe onboarding (mostly), changing name and branding to Forum

This commit is contained in:
metacryst
2026-02-26 02:12:24 -06:00
parent dd9552aad1
commit 402a99d55c
12 changed files with 47 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
{
"name": "Parchment",
"name": "Forum",
"version": "1.0.0",
"type": "module",
"scripts": {

View File

@@ -39,10 +39,32 @@ class Server {
router.get('/db/images/*', this.getUserImage)
router.get('/api/orgdata/*', this.getOrgData)
router.get('/api/mydata/*', this.getPersonalData)
router.get('/api/stripe/onboarded', this.stripeOnboarded)
router.get('/*', this.get)
return router
}
async stripeOnboarded() {
const { code } = req.body;
const response = await stripe.oauth.token({
grant_type: "authorization_code",
code,
});
const { stripe_user_id, access_token } = response;
await db.users.update({
where: { id: req.user.id },
data: {
stripeAccountId: stripe_user_id,
stripeAccessToken: access_token,
}
});
res.json({ success: true });
}
getPersonalData = async (req, res, next) => {
try {
const memberId = req.params[0]
@@ -226,8 +248,8 @@ class Server {
const app = express();
app.post("/webhook", express.raw({ type: "application/json" }), PaymentsHandler.webhook)
const allowedOrigins = new Set([
"https://www.parchment.page",
"https://parchment.page",
"https://www.frm.so",
"https://frm.so",
"http://localhost:5174",
"http://sam.local:5174",
"http://localhost:5173",
@@ -266,7 +288,7 @@ class Server {
const PORT = 10002;
server.listen(PORT, () => {
console.log("\n")
console.log(chalk.yellow("*************** parchment.page ********"))
console.log(chalk.yellow("*************** frm.so ********"))
console.log(chalk.yellowBright(`Server is running on port ${PORT}: http://localhost`));
console.log(chalk.yellow("***************************************"))
console.log("\n")

View File

@@ -69,7 +69,7 @@ class Forum extends Shadow {
ForumPanel()
input("Message Parchment", "98%")
input("Message Forum", "98%")
.paddingVertical(1, em)
.paddingLeft(2, pct)
.color("var(--accent)")

View File

@@ -30,7 +30,7 @@ class Jobs extends Shadow {
{
title: "Austin Chapter Lead",
salary: "1% of Local Revenue",
company: "Parchment",
company: "Forum",
city: "Austin",
state: "TX"
}

View File

@@ -33,7 +33,7 @@ class Market extends Shadow {
stars: "5",
reviews: 1,
price: "$12",
company: "Parchment",
company: "Forum",
type: "new",
image: "/db/images/1",
madeIn: "America"

View File

@@ -34,8 +34,13 @@ let Global = class {
const code = params.get("code");
if (code) {
// send this code to your backend
console.log("success!: ", code)
await fetch("/api/stripe/connect", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ code })
});
} else {
throw new Error("Stripe code is not present!")
}

View File

@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Parchment</title>
<title>Forum</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/_/icons/quill.svg">
<link rel="icon" href="/_/icons/columnred.svg">
<link rel="stylesheet" href="/_/code/shared.css">
<script src="/_/code/quill.js"></script>
<script src="/_/code/zod.js"></script>

View File

@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en" class="public">
<head>
<title>Parchment</title>
<title>Forum</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/_/icons/quill.svg">
<link rel="icon" href="/_/icons/columnred.svg">
<link rel="stylesheet" href="/_/code/shared.css">
<link
rel="preload"

View File

@@ -8,9 +8,9 @@ class Home extends Shadow {
MainContent() {
return VStack(() => {
HStack(() => {
img("/_/icons/quill.svg", "6vmax")
img("/_/icons/columnred.svg", "6vmax")
p("PARCHMENT")
p("FORUM")
.fontFamily("Nabla")
.fontSize(6, vmax)
.marginLeft(1, rem)
@@ -32,7 +32,7 @@ class Home extends Shadow {
.verticalAlign("center")
.horizontalAlign("center")
p("Parchment is a platform for small to medium-sized communities.")
p("Forum is a platform for communities.")
.color("var(--quillred)")
.borderTop("1px solid var(--quillred)")
.verticalAlign("center")

View File

@@ -8,7 +8,7 @@ class SignIn extends Shadow {
render() {
ZStack(() => {
img("/_/icons/quill.svg", window.isMobile() ? "5vmax" : "3vmax")
img("/_/icons/columnred.svg", window.isMobile() ? "5vmax" : "3vmax")
.position("absolute")
.top(2, em)
.left(2, em)

View File

@@ -2,7 +2,7 @@ class SignUp extends Shadow {
render() {
ZStack(() => {
img("/_/icons/quill.svg", window.isMobile() ? "5vmax" : "3vmax")
img("/_/icons/columnred.svg", window.isMobile() ? "5vmax" : "3vmax")
.position("absolute")
.top(2, em)
.left(2, em)
@@ -15,8 +15,8 @@ class SignUp extends Shadow {
h2("$50 / Month Subscription")
.color("var(--quillred)")
p(" - Access to Parchment Online and Parchment Desktop")
p(" - Ability to Create Networks")
p(" - Access to Forum Online and Forum Desktop")
p(" - Ability to Create Groups")
p(" - Up to 5GB Storage Space")
button("Buy")

View File

@@ -11,7 +11,7 @@ class SignupForm extends Shadow {
render() {
ZStack(() => {
img("/_/icons/quill.svg", window.isMobile() ? "5vmax" : "3vmax")
img("/_/icons/columnred.svg", window.isMobile() ? "5vmax" : "3vmax")
.position("absolute")
.top(2, em)
.left(2, em)