Skip to content

Commit aadd7cb

Browse files
Merge pull request #1 from ojeytonwilliams/feat/initial-setup
feat: basic setup for client and api
2 parents a98bcfe + 8681229 commit aadd7cb

Some content is hidden

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

77 files changed

+7206
-0
lines changed

apps/api/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.turbo
2+
.env

apps/api/.lintstagedrc.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* eslint-disable filenames-simple/naming-convention */
2+
import { createLintStagedConfig } from '@freecodecamp/eslint-config/lintstaged';
3+
4+
export default createLintStagedConfig(import.meta.dirname);

apps/api/configs/paths.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { join } from "path";
2+
import * as dotenv from 'dotenv';
3+
dotenv.config();
4+
5+
6+
export const SUPERBLOCK_META_DIR = join(
7+
process.cwd(),
8+
process.env.FCC_REPO_LOCATION!,
9+
"curriculum",
10+
"structure",
11+
"superblocks",
12+
);
13+
14+
export const BLOCK_META_DIR = join(
15+
process.cwd(),
16+
process.env.FCC_REPO_LOCATION!,
17+
"curriculum",
18+
"structure",
19+
"blocks",
20+
);
21+
22+
export const CHALLENGE_DIR = join(
23+
process.cwd(),
24+
process.env.FCC_REPO_LOCATION!,
25+
"curriculum",
26+
"challenges",
27+
"english",
28+
"blocks",
29+
);
30+
31+
export const ENGLISH_LANG_DIR = join(
32+
process.cwd(),
33+
process.env.FCC_REPO_LOCATION!,
34+
"client",
35+
"i18n",
36+
"locales",
37+
"english",
38+
);
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
export const superBlockList = [
2+
{
3+
name: 'Legacy Responsive Web Design',
4+
path: 'responsive-web-design'
5+
},
6+
{
7+
name: 'Legacy JavaScript Algorithms and Data Structures',
8+
path: 'javascript-algorithms-and-data-structures'
9+
},
10+
{
11+
name: 'Front End Development Libraries',
12+
path: 'front-end-development-libraries'
13+
},
14+
{
15+
name: 'Data Visualization',
16+
path: 'data-visualization'
17+
},
18+
{
19+
name: 'Back End Development and APIs',
20+
path: 'back-end-development-and-apis'
21+
},
22+
{
23+
name: 'Quality Assurance',
24+
path: 'quality-assurance'
25+
},
26+
{
27+
name: 'Scientific Computing with Python',
28+
path: 'scientific-computing-with-python'
29+
},
30+
{
31+
name: 'Data Analysis with Python',
32+
path: 'data-analysis-with-python'
33+
},
34+
{
35+
name: 'Information Security',
36+
path: 'information-security'
37+
},
38+
{
39+
name: 'Coding Interview Prep',
40+
path: 'coding-interview-prep'
41+
},
42+
{
43+
name: 'Machine Learning with Python',
44+
path: 'machine-learning-with-python'
45+
},
46+
{
47+
name: 'Relational Databases',
48+
path: 'relational-databases'
49+
},
50+
{
51+
name: 'Responsive Web Design',
52+
path: 'responsive-web-design-22'
53+
},
54+
{
55+
name: 'JavaScript Algorithms and Data Structures',
56+
path: 'javascript-algorithms-and-data-structures-22'
57+
},
58+
{
59+
name: 'The Odin Project',
60+
path: 'the-odin-project'
61+
},
62+
{
63+
name: 'College Algebra with Python',
64+
path: 'college-algebra-with-python'
65+
},
66+
{
67+
name: 'Project Euler',
68+
path: 'project-euler'
69+
},
70+
{
71+
name: '(New) Foundational C# with Microsoft',
72+
path: 'foundational-c-sharp-with-microsoft'
73+
},
74+
{
75+
name: 'A2 English for Developers',
76+
path: 'a2-english-for-developers'
77+
},
78+
{
79+
name: 'Rosetta Code',
80+
path: 'rosetta-code'
81+
},
82+
{
83+
name: 'Python For Everybody',
84+
path: 'python-for-everybody'
85+
},
86+
{
87+
name: 'B1 English for Developers (Beta)',
88+
path: 'b1-english-for-developers'
89+
},
90+
{
91+
name: 'Certified Full Stack Developer',
92+
path: 'full-stack-developer'
93+
},
94+
{
95+
name: 'A1 Professional Spanish (Beta)',
96+
path: 'a1-professional-spanish'
97+
},
98+
{
99+
name: 'A2 Professional Spanish (Beta)',
100+
path: 'a2-professional-spanish'
101+
},
102+
{
103+
name: 'A2 Professional Chinese (Beta)',
104+
path: 'a2-professional-chinese'
105+
},
106+
{
107+
name: 'Basic HTML',
108+
path: 'basic-html'
109+
},
110+
{
111+
name: 'Semantic HTML',
112+
path: 'semantic-html'
113+
},
114+
{
115+
name: 'A1 Professional Chinese (Beta)',
116+
path: 'a1-professional-chinese'
117+
}
118+
];

apps/api/eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { configTypeChecked } from '@freecodecamp/eslint-config/base';
2+
3+
export default configTypeChecked;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface ChallengeData {
2+
name: string;
3+
id: string;
4+
path: string;
5+
}

apps/api/interfaces/intro.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
interface SuperBlock {
2+
title: string;
3+
intro: string[];
4+
blocks: string[];
5+
modules?: string[];
6+
chapters?: string[];
7+
}
8+
9+
export interface Intro {
10+
[key: string]: SuperBlock;
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface PartialMeta {
2+
name: string;
3+
dashedName: string;
4+
challengeOrder: { id: string; title: string }[];
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export interface SuperBlockModule {
2+
dashedName: string;
3+
blocks?: string[];
4+
}
5+
6+
export interface SuperBlockChapter {
7+
dashedName: string;
8+
modules: SuperBlockModule[];
9+
}
10+
11+
export interface SuperBlockMeta {
12+
blocks?: string[];
13+
chapters?: SuperBlockChapter[];
14+
}

apps/api/interfaces/tools.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
type ToolsFunction = (
2+
directory: string
3+
) => Promise<{ stdout: string; stderr: string }>;
4+
5+
type ToolsFunctionWithArg = (
6+
directory: string,
7+
start: number
8+
) => Promise<{ stdout: string; stderr: string }>;
9+
10+
export interface ToolsSwitch {
11+
'create-next-step': ToolsFunction;
12+
'create-empty-steps': ToolsFunctionWithArg;
13+
'insert-step': ToolsFunctionWithArg;
14+
'delete-step': ToolsFunctionWithArg;
15+
'update-step-titles': ToolsFunction;
16+
}

0 commit comments

Comments
 (0)