Skip to content

Commit 7be2cb5

Browse files
Merge branch 'develop-postgres' into creator-vitest
2 parents 344dd61 + 8dca2ac commit 7be2cb5

16 files changed

+144
-3310
lines changed

.github/workflows/pull-request.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,20 @@ jobs:
312312
source venv/bin/activate
313313
python .github/workflows/scripts/check_docstrings.py --directories .github
314314
315+
316+
# Import-Sample-Data:
317+
# name: Import Sample Data
318+
# runs-on: ubuntu-latest
319+
# steps:
320+
# - name: Checkout this repository
321+
# uses: actions/[email protected]
322+
# - name: Create .env file for talawa api testing environment
323+
# run: cp ./envFiles/.env.ci ./.env
324+
# - name: Build talawa api non production environment docker image
325+
# run: docker compose build
326+
# - name: Run import:sample-data
327+
# uses: addnab/docker-run-action@v3
328+
# with:
329+
# image: talawa_api
330+
# options: --env-file ./envFiles/.env.ci
331+
# run: pnpm run import:sample-data

docs/docs/docs/getting-started/installation.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@ devcontainer build --workspace-folder .
295295
devcontainer up --workspace-folder .
296296
```
297297
298+
#### Import Sample Data
299+
300+
1. Once the server is running, open a new terminal session.
301+
2. Open a bash session inside the running container:
302+
```bash
303+
docker exec -it talawa-api-1 /bin/bash
304+
```
305+
3. Inside the container, run the following command to import sample data into the database:
306+
```bash
307+
pnpm run import:sample-data
308+
```
309+
298310
### Setup: Using the VScode IDE
299311

300312
You can setup the app using the VScode IDE. Here are the steps to follow:

package.json

Lines changed: 99 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,101 @@
11
{
2-
"author": "Palisadoes Foundation",
3-
"bugs": {
4-
"url": "https://github.com/PalisadoesFoundation/talawa-api/issues"
5-
},
6-
"dependencies": {
7-
"@fastify/cors": "^10.0.2",
8-
"@fastify/helmet": "^13.0.1",
9-
"@fastify/jwt": "^9.0.3",
10-
"@fastify/rate-limit": "^10.2.2",
11-
"@fastify/type-provider-typebox": "^5.1.0",
12-
"@node-rs/argon2": "^2.0.2",
13-
"@pothos/core": "^4.3.0",
14-
"@pothos/plugin-relay": "^4.3.0",
15-
"@sinclair/typebox": "^0.34.15",
16-
"ajv-formats": "^3.0.1",
17-
"close-with-grace": "^2.2.0",
18-
"drizzle-orm": "^0.39.1",
19-
"drizzle-zod": "0.6.1",
20-
"env-schema": "^6.0.1",
21-
"fastify": "^5.2.1",
22-
"fastify-plugin": "^5.0.1",
23-
"graphql": "^16.10.0",
24-
"graphql-scalars": "^1.24.0",
25-
"graphql-upload-minimal": "^1.6.1",
26-
"mercurius": "^16.0.1",
27-
"mercurius-upload": "^8.0.0",
28-
"minio": "^8.0.4",
29-
"postgres": "^3.4.5",
30-
"ulidx": "^2.4.1",
31-
"uuid": "^11.0.5",
32-
"uuidv7": "^1.0.2",
33-
"zod": "^3.24.1"
34-
},
35-
"description": "talawa-api is a backend repository written using Node.js and graphql for generating APIs for the talawa flutter app.",
36-
"devDependencies": {
37-
"@biomejs/biome": "^1.9.4",
38-
"@faker-js/faker": "^9.4.0",
39-
"@swc/cli": "0.6.0",
40-
"@swc/core": "^1.10.9",
41-
"@types/node": "^22.10.7",
42-
"@types/uuid": "^10.0.0",
43-
"@vitest/coverage-v8": "^3.0.3",
44-
"drizzle-kit": "^0.30.4",
45-
"drizzle-seed": "^0.3.1",
46-
"gql.tada": "^1.8.10",
47-
"lefthook": "^1.10.10",
48-
"mercurius-integration-testing": "^9.0.1",
49-
"pino-pretty": "^13.0.0",
50-
"tsx": "^4.19.2",
51-
"typescript": "^5.7.3",
52-
"vite-tsconfig-paths": "^5.1.4",
53-
"vitest": "^3.0.3"
54-
},
55-
"engines": {
56-
"node": "22.13.0"
57-
},
58-
"homepage": "https://github.com/PalisadoesFoundation/talawa-api#readme",
59-
"keywords": [
60-
"chats",
61-
"community",
62-
"events",
63-
"organization"
64-
],
65-
"license": "GNU General Public License v3.0",
66-
"main": "./dist/index.js",
67-
"name": "talawa-api",
68-
"packageManager": "[email protected]",
69-
"repository": {
70-
"type": "git",
71-
"url": "https://github.com/PalisadoesFoundation/talawa-api"
72-
},
73-
"scripts": {
74-
"apply_drizzle_migrations": "drizzle-kit migrate",
75-
"apply_drizzle_test_migrations": "drizzle-kit migrate --config=./test/drizzle.config.ts",
76-
"build_production": "swc ./src/ --ignore \"**/*.spec.ts,**/*.test.ts\" --out-dir ./dist/ --strip-leading-paths",
77-
"check_code_quality": "biome check --error-on-warnings",
78-
"check_drizzle_migrations": "drizzle-kit check",
79-
"check_gql_tada": "gql.tada doctor && gql.tada check --fail-on-warn",
80-
"check_type_errors": "tsc",
81-
"disable_git_hooks": "lefthook uninstall",
82-
"drop_drizzle_migrations": "drizzle-kit drop",
83-
"enable_git_hooks": "lefthook install",
84-
"fix_code_quality": "biome check --error-on-warnings --write",
85-
"generate_drizzle_migrations": "drizzle-kit generate",
86-
"generate_graphql_sdl_file": "tsx ./scripts/generateGraphQLSDLFile.ts",
87-
"generate_gql_tada": "gql.tada generate-output && gql.tada turbo --fail-on-warn",
88-
"import:sample-data": "tsx ./src/utilities/loadSampleData.ts",
89-
"push_drizzle_schema": "drizzle-kit push",
90-
"push_drizzle_test_schema": "drizzle-kit push --config=./test/drizzle.config.ts",
91-
"run_tests": "vitest --coverage",
92-
"start_development_server": "tsx watch ./src/index.ts",
93-
"start_development_server_with_debugger": "tsx watch --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./src/index.ts",
94-
"start_production_server": "pnpm build_production && node ./dist/index.js",
95-
"start_production_server_with_debugger": "pnpm build_production && node --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./dist/index.js",
96-
"upgrade_drizzle_metadata": "drizzle-kit up"
97-
},
98-
"type": "module",
99-
"version": "1.0.0"
2+
"author": "Palisadoes Foundation",
3+
"bugs": {
4+
"url": "https://github.com/PalisadoesFoundation/talawa-api/issues"
5+
},
6+
"dependencies": {
7+
"@fastify/cors": "^10.0.2",
8+
"@fastify/helmet": "^13.0.1",
9+
"@fastify/jwt": "^9.0.3",
10+
"@fastify/rate-limit": "^10.2.2",
11+
"@fastify/type-provider-typebox": "^5.1.0",
12+
"@node-rs/argon2": "^2.0.2",
13+
"@pothos/core": "^4.3.0",
14+
"@pothos/plugin-relay": "^4.3.0",
15+
"@sinclair/typebox": "^0.34.15",
16+
"ajv-formats": "^3.0.1",
17+
"close-with-grace": "^2.2.0",
18+
"drizzle-orm": "^0.39.1",
19+
"drizzle-zod": "0.6.1",
20+
"dotenv": "^16.0.3",
21+
"env-schema": "^6.0.1",
22+
"fastify": "^5.2.1",
23+
"fastify-plugin": "^5.0.1",
24+
"graphql": "^16.10.0",
25+
"graphql-scalars": "^1.24.0",
26+
"graphql-upload-minimal": "^1.6.1",
27+
"mercurius": "^16.0.1",
28+
"mercurius-upload": "^8.0.0",
29+
"minio": "^8.0.4",
30+
"postgres": "^3.4.5",
31+
"ulidx": "^2.4.1",
32+
"uuid": "^11.0.5",
33+
"uuidv7": "^1.0.2",
34+
"zod": "^3.24.1"
35+
},
36+
"description": "talawa-api is a backend repository written using Node.js and graphql for generating APIs for the talawa flutter app.",
37+
"devDependencies": {
38+
"@biomejs/biome": "^1.9.4",
39+
"@faker-js/faker": "^9.4.0",
40+
"@swc/cli": "0.6.0",
41+
"@swc/core": "^1.10.9",
42+
"@types/node": "^22.10.7",
43+
"@types/uuid": "^10.0.0",
44+
"@vitest/coverage-v8": "^3.0.3",
45+
"drizzle-kit": "^0.30.4",
46+
"drizzle-seed": "^0.3.1",
47+
"gql.tada": "^1.8.10",
48+
"lefthook": "^1.10.10",
49+
"mercurius-integration-testing": "^9.0.1",
50+
"pino-pretty": "^13.0.0",
51+
"tsx": "^4.19.2",
52+
"typescript": "^5.7.3",
53+
"vite-tsconfig-paths": "^5.1.4",
54+
"vitest": "^3.0.3"
55+
},
56+
"engines": {
57+
"node": "22.13.0"
58+
},
59+
"homepage": "https://github.com/PalisadoesFoundation/talawa-api#readme",
60+
"keywords": [
61+
"chats",
62+
"community",
63+
"events",
64+
"organization"
65+
],
66+
"license": "GNU General Public License v3.0",
67+
"main": "./dist/index.js",
68+
"name": "talawa-api",
69+
"packageManager": "[email protected]",
70+
"repository": {
71+
"type": "git",
72+
"url": "https://github.com/PalisadoesFoundation/talawa-api"
73+
},
74+
"scripts": {
75+
"apply_drizzle_migrations": "drizzle-kit migrate",
76+
"apply_drizzle_test_migrations": "drizzle-kit migrate --config=./test/drizzle.config.ts",
77+
"build_production": "swc ./src/ --ignore \"**/*.spec.ts,**/*.test.ts\" --out-dir ./dist/ --strip-leading-paths",
78+
"check_code_quality": "biome check --error-on-warnings",
79+
"check_drizzle_migrations": "drizzle-kit check",
80+
"check_gql_tada": "gql.tada doctor && gql.tada check --fail-on-warn",
81+
"check_type_errors": "tsc",
82+
"disable_git_hooks": "lefthook uninstall",
83+
"drop_drizzle_migrations": "drizzle-kit drop",
84+
"enable_git_hooks": "lefthook install",
85+
"fix_code_quality": "biome check --error-on-warnings --write",
86+
"generate_drizzle_migrations": "drizzle-kit generate",
87+
"generate_graphql_sdl_file": "tsx ./scripts/generateGraphQLSDLFile.ts",
88+
"generate_gql_tada": "gql.tada generate-output && gql.tada turbo --fail-on-warn",
89+
"import:sample-data": "tsx ./src/utilities/loadSampleData.ts",
90+
"push_drizzle_schema": "drizzle-kit push",
91+
"push_drizzle_test_schema": "drizzle-kit push --config=./test/drizzle.config.ts",
92+
"run_tests": "vitest --coverage",
93+
"start_development_server": "tsx watch ./src/index.ts",
94+
"start_development_server_with_debugger": "tsx watch --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./src/index.ts",
95+
"start_production_server": "pnpm build_production && node ./dist/index.js",
96+
"start_production_server_with_debugger": "pnpm build_production && node --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./dist/index.js",
97+
"upgrade_drizzle_metadata": "drizzle-kit up"
98+
},
99+
"type": "module",
100+
"version": "1.0.0"
100101
}

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)