Skip to content

Commit a940e46

Browse files
brian-montgomeryshlokmestrycourtneylinderrachaelbradleydependabot[bot]
authored
Merging in Login into Main ER Branch (#529)
Added better-auth/drizzle/react-email/resend. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: shlok <152443068+shlokmestry@users.noreply.github.com> Co-authored-by: Courtney Linder <clinder614@icloud.com> Co-authored-by: rachaelbradley <rachaelbradley@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: aluevano859 <amandareneahall@gmail.com> Co-authored-by: Michael Cooper <1991467+michael-n-cooper@users.noreply.github.com> Co-authored-by: alexisreytech <89283739+alexisreytech@users.noreply.github.com> Co-authored-by: Ashim Gautam Upadhaya <asimupdgtm@gmail.com>
1 parent 80f9b96 commit a940e46

134 files changed

Lines changed: 12781 additions & 5945 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ astro/src/protected-materials/
2222
# Test files and debug content
2323
**/test*.astro
2424
**/debug*.astro
25-
**/*-test.*
25+
**/*-test.*
26+
# Local Netlify folder
27+
.netlify

astro/astro.config.mjs

Lines changed: 77 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { defineConfig, envField } from "astro/config";
2+
import { remarkDefinitionList, defListHastHandlers } from 'remark-definition-list';
23
import styleGuide from "./style-guide/register.js";
34

45
import icon from "astro-icon";
56
import mdx from "@astrojs/mdx";
67
import netlify from '@astrojs/netlify';
8+
import react from '@astrojs/react';
79
import robotsTxt from "astro-robots-txt";
810
import sitemap from "@astrojs/sitemap";
911

@@ -26,7 +28,7 @@ const botsToDisallow = [
2628

2729
export default defineConfig({
2830
site: "https://accessiblecommunity.org",
29-
output: 'server',
31+
output: 'static',
3032
adapter: netlify(),
3133

3234
server: {
@@ -41,6 +43,9 @@ export default defineConfig({
4143
"/services/globa11y/": "/globa11y/",
4244
"/services/mutua11y/": "/mutua11y/",
4345
"/services/tip-of-the-week": "/tips/",
46+
// Redirect to Github projects
47+
"/fixable": "https://accessiblecommunity.github.io/fixable/",
48+
"/useable": "https://accessiblecommunity.github.io/useable/",
4449
},
4550

4651
vite: {
@@ -51,75 +56,80 @@ export default defineConfig({
5156

5257
env: {
5358
schema: {
59+
BETTER_AUTH_SECRET: envField.string({ context: "server", access: "secret", optional: false }),
60+
BETTER_AUTH_URL: envField.string({ context: "server", access: "public", }),
5461
DATABASE_URL: envField.string({ context: "server", access: "secret", optional: false }),
62+
RESEND_API_KEY: envField.string({ context: "server", access: "secret", optional: false }),
63+
// TODO: Remove later.
64+
TEST_EMAIL: envField.string({ context: "server", access: "public", optional: false }),
5565
}
5666
},
5767

58-
integrations: [
59-
mdx(),
60-
styleGuide(),
61-
icon({
62-
include: {
63-
// Bootstrap Icons
64-
bi: [
65-
// Navigation
66-
'arrow-down-square', 'arrow-up-right-square', 'arrow-right-square', 'list',
67-
// Contact Info
68-
'envelope-at-fill', 'telephone-fill', 'geo-alt-fill',
69-
// Social Media
70-
'facebook', 'instagram', 'linkedin', 'rss-fill', 'tiktok', 'globe', 'mastodon', 'twitter',
71-
// Descriptive
72-
'gift-fill', 'pencil-fill', 'people-fill', 'person-fill',
73-
// Additional icons
74-
'check-circle-fill', 'exclamation-triangle-fill', 'file-text-fill', 'display-fill', 'puzzle-fill', 'tools',
75-
'gift-fill', 'pencil-fill', 'people-fill', 'person-fill', 'puzzle-fill', 'stopwatch-fill', 'tools',
76-
],
77-
// CoreUI Brands
78-
cib: [
79-
// Social Media
80-
'facebook', 'instagram', 'linkedin', 'mastodon', 'twitter',
81-
// Streaming
82-
'apple-podcasts', 'youtube',
83-
// Payment
84-
"cc-paypal", "cc-stripe", "paypal", "stripe",
85-
],
86-
'simple-icons': [
87-
// Streaming
88-
'podcastindex'
68+
markdown: {
69+
remarkPlugins: [ remarkDefinitionList, ],
70+
remarkRehype: { handlers: defListHastHandlers },
71+
},
72+
73+
integrations: [mdx(), react(), styleGuide(), icon({
74+
include: {
75+
// Bootstrap Icons
76+
bi: [
77+
// Navigation
78+
'arrow-down-square', 'arrow-up-right-square', 'arrow-right-square', 'list',
79+
// Contact Info
80+
'envelope-at-fill', 'telephone-fill', 'geo-alt-fill',
81+
// Social Media
82+
'facebook', 'instagram', 'linkedin', 'rss-fill', 'tiktok', 'globe', 'mastodon', 'twitter',
83+
'github',
84+
// Descriptive
85+
'gift-fill', 'pencil-fill', 'people-fill', 'person-fill',
86+
// Additional icons
87+
'check-circle-fill', 'exclamation-triangle-fill', 'file-text-fill', 'display-fill', 'puzzle-fill', 'tools',
88+
'gift-fill', 'pencil-fill', 'people-fill', 'person-fill', 'puzzle-fill', 'stopwatch-fill', 'tools',
89+
],
90+
// CoreUI Brands
91+
cib: [
92+
// Social Media
93+
'facebook', 'instagram', 'linkedin', 'mastodon', 'twitter',
94+
// Streaming
95+
'apple-podcasts', 'youtube',
96+
// Payment
97+
"cc-paypal", "cc-stripe", "paypal", "stripe",
98+
],
99+
'simple-icons': [
100+
// Streaming
101+
'podcastindex'
102+
],
103+
}
104+
}), sitemap({
105+
filter: (page) =>
106+
!page.endsWith('/commitment-form/') &&
107+
!page.includes('/fixable/') &&
108+
!page.includes('/services/escape-room/content/') &&
109+
!page.endsWith('tips/archive/')
110+
}), robotsTxt({
111+
sitemap: true,
112+
policy: [
113+
// Block specified bots entirely
114+
...botsToDisallow.map((userAgent) => ({
115+
userAgent,
116+
disallow: ['/'],
117+
})),
118+
// General user-agent rules
119+
{
120+
userAgent: '*',
121+
allow: ['/', '/materials/basic/'],
122+
disallow: [
123+
'/fixable/',
124+
'/materials/premium/',
125+
'/protected-materials/',
126+
'/api/download-material',
127+
'/api/digital-content',
128+
'/api/verify-purchase',
129+
'/services/escape-room/content/',
130+
'/tips/archive/',
89131
],
90132
}
91-
}),
92-
sitemap({
93-
filter: (page) =>
94-
!page.endsWith('/commitment-form/') &&
95-
!page.includes('/fixable/') &&
96-
!page.includes('/services/escape-room/content/') &&
97-
!page.endsWith('tips/archive/')
98-
}),
99-
robotsTxt({
100-
sitemap: true,
101-
policy: [
102-
// Block specified bots entirely
103-
...botsToDisallow.map((userAgent) => ({
104-
userAgent,
105-
disallow: ['/'],
106-
})),
107-
// General user-agent rules
108-
{
109-
userAgent: '*',
110-
allow: ['/', '/materials/basic/'],
111-
disallow: [
112-
'/fixable/',
113-
'/materials/premium/',
114-
'/protected-materials/',
115-
'/api/download-material',
116-
'/api/digital-content',
117-
'/api/verify-purchase',
118-
'/services/escape-room/content/',
119-
'/tips/archive/',
120-
],
121-
},
122-
]
123-
})
124-
],
125-
});
133+
],
134+
})],
135+
});

astro/drizzle.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineConfig } from 'drizzle-kit';
33

44
export default defineConfig({
55
out: './drizzle',
6-
schema: './src/db/schema.ts',
6+
schema: './src/db/schema',
77
dialect: 'postgresql',
88
dbCredentials: {
99
url: process.env.DATABASE_URL!,

astro/drizzle/0000_secret_leo.sql

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
CREATE TABLE "account" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"account_id" text NOT NULL,
4+
"provider_id" text NOT NULL,
5+
"user_id" text NOT NULL,
6+
"access_token" text,
7+
"refresh_token" text,
8+
"id_token" text,
9+
"access_token_expires_at" timestamp,
10+
"refresh_token_expires_at" timestamp,
11+
"scope" text,
12+
"password" text,
13+
"created_at" timestamp DEFAULT now() NOT NULL,
14+
"updated_at" timestamp NOT NULL
15+
);
16+
--> statement-breakpoint
17+
CREATE TABLE "session" (
18+
"id" text PRIMARY KEY NOT NULL,
19+
"expires_at" timestamp NOT NULL,
20+
"token" text NOT NULL,
21+
"created_at" timestamp DEFAULT now() NOT NULL,
22+
"updated_at" timestamp NOT NULL,
23+
"ip_address" text,
24+
"user_agent" text,
25+
"user_id" text NOT NULL,
26+
CONSTRAINT "session_token_unique" UNIQUE("token")
27+
);
28+
--> statement-breakpoint
29+
CREATE TABLE "user" (
30+
"id" text PRIMARY KEY NOT NULL,
31+
"name" text NOT NULL,
32+
"email" text NOT NULL,
33+
"email_verified" boolean DEFAULT false NOT NULL,
34+
"image" text,
35+
"created_at" timestamp DEFAULT now() NOT NULL,
36+
"updated_at" timestamp DEFAULT now() NOT NULL,
37+
CONSTRAINT "user_email_unique" UNIQUE("email")
38+
);
39+
--> statement-breakpoint
40+
CREATE TABLE "verification" (
41+
"id" text PRIMARY KEY NOT NULL,
42+
"identifier" text NOT NULL,
43+
"value" text NOT NULL,
44+
"expires_at" timestamp NOT NULL,
45+
"created_at" timestamp DEFAULT now() NOT NULL,
46+
"updated_at" timestamp DEFAULT now() NOT NULL
47+
);
48+
--> statement-breakpoint
49+
ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
50+
ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
51+
CREATE INDEX "account_userId_idx" ON "account" USING btree ("user_id");--> statement-breakpoint
52+
CREATE INDEX "session_userId_idx" ON "session" USING btree ("user_id");--> statement-breakpoint
53+
CREATE INDEX "verification_identifier_idx" ON "verification" USING btree ("identifier");

0 commit comments

Comments
 (0)