Skip to content

Commit e90765b

Browse files
author
Addison.Rogers
committed
update: remove dummy data, add database schema, and configure workspace files
1 parent a9494da commit e90765b

File tree

7 files changed

+109
-37
lines changed

7 files changed

+109
-37
lines changed

.idea/dataSources.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sqldialects.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.obsidian/workspace.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44
"type": "split",
55
"children": [
66
{
7-
"id": "e44e728d106a4347",
7+
"id": "c5dd88d81c914d11",
88
"type": "tabs",
99
"children": [
1010
{
11-
"id": "298f3c30674a9a21",
11+
"id": "8844a0f73f079adb",
1212
"type": "leaf",
1313
"state": {
14-
"type": "empty",
15-
"state": {},
14+
"type": "markdown",
15+
"state": {
16+
"file": "Technical Design/Database Design.md",
17+
"mode": "source",
18+
"source": false
19+
},
1620
"icon": "lucide-file",
17-
"title": "New tab"
21+
"title": "Database Design"
1822
}
1923
}
2024
]
@@ -164,16 +168,16 @@
164168
"command-palette:Open command palette": false
165169
}
166170
},
167-
"active": "298f3c30674a9a21",
171+
"active": "8844a0f73f079adb",
168172
"lastOpenFiles": [
173+
"Index.md",
169174
"Technical Design/Getting Skills.md",
170175
"Technical Design/Graph View.md",
171176
"Technical Design/Sequence diagram.md",
172177
"Technical Design/Database Design.md",
173178
"shapes at 25-07-07 22.54.22.png",
174179
"Pasted image 20250707224530.png",
175180
"Pasted image 20250707223421.png",
176-
"Index.md",
177181
"Technical Design/Use Cases.md",
178182
"Interviews/Diwas - Placement Perspective.md",
179183
"Interviews/Harrison - Apprenticeship Perspective.md",

migrations/init.sql

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
-- SKILL table
2+
CREATE TABLE skill
3+
(
4+
id TEXT PRIMARY KEY,
5+
name TEXT UNIQUE NOT NULL,
6+
description TEXT,
7+
created_at TIMESTAMP NOT NULL,
8+
updated_at TIMESTAMP NOT NULL
9+
);
10+
11+
-- USER_SKILL table
12+
CREATE TABLE user_skill
13+
(
14+
id TEXT PRIMARY KEY,
15+
user_id TEXT NOT NULL REFERENCES "user" (id),
16+
skill_id TEXT NOT NULL REFERENCES skill (id),
17+
acquired_at TIMESTAMP,
18+
level INTEGER
19+
);
20+
21+
-- CERTIFICATION table
22+
CREATE TABLE certification
23+
(
24+
id TEXT PRIMARY KEY,
25+
name TEXT NOT NULL,
26+
issuer TEXT
27+
);
28+
29+
-- USER_CERTIFICATION table
30+
CREATE TABLE user_certification
31+
(
32+
id TEXT PRIMARY KEY,
33+
user_id TEXT NOT NULL REFERENCES "user" (id),
34+
cert_id TEXT NOT NULL REFERENCES certification (id),
35+
issued_at TIMESTAMP,
36+
expires_at TIMESTAMP
37+
);
38+
39+
-- ROLE table
40+
CREATE TABLE role
41+
(
42+
id TEXT PRIMARY KEY,
43+
name TEXT,
44+
description TEXT
45+
);
46+
47+
-- CLIENT table
48+
CREATE TABLE client
49+
(
50+
id TEXT PRIMARY KEY,
51+
name TEXT NOT NULL,
52+
description TEXT
53+
);
54+
55+
-- PROJECT table
56+
CREATE TABLE project
57+
(
58+
id TEXT PRIMARY KEY,
59+
name TEXT NOT NULL,
60+
description TEXT,
61+
started_at TIMESTAMP,
62+
ended_at TIMESTAMP
63+
);
64+
65+
-- CLIENT_PROJECT table
66+
CREATE TABLE client_project
67+
(
68+
id TEXT PRIMARY KEY,
69+
client_id TEXT NOT NULL REFERENCES client (id),
70+
project_id TEXT NOT NULL REFERENCES project (id)
71+
);
72+
73+
-- PROJECT_USER table
74+
CREATE TABLE project_user
75+
(
76+
id TEXT PRIMARY KEY,
77+
project_id TEXT NOT NULL REFERENCES project (id),
78+
user_id TEXT NOT NULL REFERENCES "user" (id),
79+
role_id TEXT REFERENCES role (id)
80+
);

src/app/dummyData/edges.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/app/dummyData/nodes.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/app/page.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@ import {useSession} from "@/lib/auth-client";
55
import SkillsSidebar from "@/components/skills-sidebar";
66
import SkillsFlow from "@/components/skills-flow";
77

8-
import rawNodes from "./dummyData/nodes.json";
9-
import rawEdges from "./dummyData/edges.json";
10-
import {Edge, Node} from "@xyflow/react";
118

129
export default function Home() {
1310
const {isPending, data} = useSession();
1411
const status = isPending ? "loading" : "authenticated";
1512
const user = data?.user;
1613

17-
// Get data from backend with user info
18-
// Otherwise show default
19-
const nodes: Node[] = rawNodes;
20-
const edges: Edge[] = rawEdges;
2114

2215

2316
return (

0 commit comments

Comments
 (0)