Skip to content

Commit

Permalink
Create monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed May 11, 2024
1 parent f68a2f6 commit 2aea707
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 14 deletions.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# 4-growth
# 4-GROWTH

This is a mono-repo project that contains several applications, all part of the 4-GROWTH initiative. The applications are built using a variety of technologies, including TypeScript, JavaScript, and React.

## Applications

The repository includes the following applications:

- `api`: This is the backend application, built with NestJS.
- `client`: This is the frontend application, built with React.

TODO: Add the following applications to the list:
- `admin`: This is the admin panel

## Package Manager

We use `pnpm` for managing packages in this project. This allows us to efficiently share common dependencies across the different applications in the mono-repo.

## Mono-repo Architecture

The mono-repo architecture allows us to keep all our related applications in one place, making it easier to share code and manage dependencies. Each application resides in its own directory and has its own `package.json` file.

## Scripts

Here are some of the npm scripts that you can run:

- `pnpm start:api`: Starts the backend application
- `pnpm start:client`: Starts the application in watch mode
- `pnpm install`: Install all dependencies
30 changes: 29 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
4-GROWTH API
# 4-GROWTH API

This project is built with NestJS.

## NestJS Version

The project uses NestJS version 10.0.0.

## Package Manager

The project uses `pnpm` as the package manager.

## Node Version

The project uses Node.js version 20.10.0 as specified in the `.nvmrc` file.

## Continuous Integration

The project uses GitHub Actions for continuous integration. The workflow for API tests is defined in `.github/workflows/api-tests.yml`. This workflow runs end-to-end tests on every push to the `api` directory and can also be manually triggered.

## Scripts

Here are some of the npm scripts that you can run:

- `pnpm build`: Compiles the TypeScript code
- `pnpm start`: Starts the application
- `pnpm start:dev`: Starts the application in watch mode
- `pnpm test`: Runs the tests
- `pnpm test:e2e`: Runs the end-to-end tests
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "api",
"name": "4-growth-api",
"version": "0.0.1",
"description": "",
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "4-growth",
"name": "4-growth-client",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down
6 changes: 0 additions & 6 deletions client/pnpm-workspace.yaml

This file was deleted.

21 changes: 17 additions & 4 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": ".",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,9 +24,16 @@
}
],
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"src/**/*",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "4-growth",
"private": true,
"scripts": {
"install": "pnpm install",
"start:api": "pnpm --filter 4-growth-api run start",
"start:client": "pnpm --filter 4-growth-client run dev"
}
}
5 changes: 5 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pnpm-workspaces.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages:
- 'api/**'
- 'client/**'
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"baseUrl": ".",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": true,
"noImplicitAny": true,
"strictBindCallApply": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"@api/*": ["./api/src/*"],
"@client/*": ["./client/web/*"]
}
}
}

0 comments on commit 2aea707

Please sign in to comment.