Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e4979d5
feat: add and setup better-auth to backend
martakam Oct 12, 2026
eccf9c0
feat: add better-auth client to frontend
martakam Oct 12, 2026
a27cae6
build: add Tanstack form and zod for form validation
martakam Oct 12, 2026
dffc38a
feat: add sign-up route
martakam Oct 13, 2026
6401867
feat: add login route
martakam Oct 13, 2026
443d5dd
feat: show user in Header
martakam Oct 13, 2026
a97d527
feat: adjust ApolloContext and CORS to prepare for authenticated Grap…
martakam Oct 13, 2026
b507f2d
feat: add additional bio field to user table
martakam Oct 13, 2026
522ef17
feat: add favoriteBooks schema and move relations
martakam Oct 13, 2026
25b54d8
chore: add Mutation type to base GraphQL schema
martakam Oct 13, 2026
47bacbe
feat: add GraphQL schema and resolvers for favorite books
martakam Oct 13, 2026
44d6f09
chore: generate new GraphQL types
martakam Oct 13, 2026
d460367
feat: include credentials when using ApolloClient
martakam Oct 13, 2026
4735e6e
feat: add Profile page to share your favorite books
martakam Oct 13, 2026
e82bbce
feat: make project name and user name in header clickable
martakam Oct 13, 2026
e7ffb09
chore: add generated GraphQL types to frontend
martakam Oct 13, 2026
df6ce04
feat: add settings page to allow changing profile and password
martakam Oct 13, 2026
b58f840
chore: enforce correct password length in better-auth
martakam Oct 13, 2026
b066f9c
build: start postgres db in background
martakam Oct 13, 2026
c34c2bd
feat: add proper pagination to user favorites
martakam Oct 13, 2026
ae8f351
chore: generate GraphQL types
martakam Oct 13, 2026
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
6 changes: 6 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
DATABASE_URL=postgresql://postgres@localhost:5433/readr
BETTER_AUTH_URL=http://localhost:3001
FRONTEND_URL=http://localhost:5173

# Add a random string here
# In order to generate one, you may use this command: openssl rand -base64 32
BETTER_AUTH_SECRET=
5 changes: 4 additions & 1 deletion backend/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const config: CodegenConfig = {
schema: "**/schema.graphql",
generates: {
"src/schema": defineConfig({
typesPluginsConfig: { useTypeImports: true },
typesPluginsConfig: {
useTypeImports: true,
contextType: "~/index#ApolloContext",
},
}),
},
};
Expand Down
2 changes: 1 addition & 1 deletion backend/drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from "drizzle-kit";

export default defineConfig({
out: "./drizzle",
schema: "./src/db/schema.ts",
schema: "./src/db/schema/index.ts",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL!,
Expand Down
4 changes: 3 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": "esbuild src/index.ts --bundle --platform=node --format=esm --target=node24 --packages=external --outfile=dist/index.js",
"start": "pnpm build && node dist/index.js",
"db:init": "initdb -D db-data -U postgres -E UTF8 --auth=trust",
"db:start": "pg_ctl -D db-data -l ./db-data/db-data.log -w -o \"-p 5433 -c listen_addresses=127.0.0.1\" start",
"db:start": "node -e \"require('child_process').spawnSync('pg_ctl',['-D','db-data','-l','db-data/db-data.log','-w','-o','-p 5433 -c listen_addresses=127.0.0.1','start'],{stdio:'ignore',windowsHide:true})\"",
"db:create": "createdb -h 127.0.0.1 -p 5433 -U postgres readr",
"db:stop": "pg_ctl -D db-data stop",
"db:status": "pg_ctl -D db-data status",
Expand All @@ -43,7 +43,9 @@
"dependencies": {
"@apollo/server": "^5.5.1",
"@as-integrations/express5": "^1.1.2",
"@better-auth/drizzle-adapter": "^1.7.7",
"@graphql-tools/merge": "^9.2.6",
"better-auth": "^1.7.7",
"cors": "^2.8.6",
"csv-parse": "^7.0.3",
"dotenv": "^18.0.5",
Expand Down
Loading