feat(monorepo): migrate to typescript monorepo

This commit is contained in:
2025-11-07 17:09:29 +02:00
committed by BernardNganduDev
parent 3e09956f05
commit 075a388ccb
745 changed files with 2341 additions and 5082 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
name: backend audit
name: api-legacy audit
defaults:
run:
working-directory: projects/backend
working-directory: projects/api-legacy
on:
workflow_call:
@@ -9,13 +9,13 @@ on:
branches-ignore:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
pull_request:
branches-ignore:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
jobs:
@@ -39,7 +39,7 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php8.4-composer-${{ hashFiles('projects/backend/composer.lock') }}
key: php8.4-composer-${{ hashFiles('projects/api-legacy/composer.lock') }}
restore-keys: |
php8.4-composer-latest-
- name: Update composer
+3 -3
View File
@@ -1,14 +1,14 @@
name: backend deploy
name: api-legacy deploy
defaults:
run:
working-directory: projects/backend
working-directory: projects/api-legacy
on:
push:
branches:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
jobs:
audit:
+5 -5
View File
@@ -1,7 +1,7 @@
name: backend quality
name: api-legacy quality
defaults:
run:
working-directory: projects/backend
working-directory: projects/api-legacy
on:
workflow_call:
@@ -9,13 +9,13 @@ on:
branches-ignore:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
pull_request:
branches-ignore:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
jobs:
@@ -39,7 +39,7 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php8.4-composer-${{ hashFiles('projects/backend/composer.lock') }}
key: php8.4-composer-${{ hashFiles('projects/api-legacy/composer.lock') }}
restore-keys: |
php8.4-composer-latest-
- name: Update composer
+4 -4
View File
@@ -1,7 +1,7 @@
name: backend tests
name: api-legacy tests
defaults:
run:
working-directory: projects/backend
working-directory: projects/api-legacy
on:
workflow_call:
@@ -9,13 +9,13 @@ on:
branches-ignore:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
pull_request:
branches-ignore:
- main
paths:
- "projects/backend/**"
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
jobs:
functional:
+2 -2
View File
@@ -6,11 +6,11 @@ defaults:
on:
push:
paths:
- "projects/mobile/**"
- "../../basango/apps/mobile/**"
- ".github/workflows/mobile_*.yaml"
pull_request:
paths:
- "projects/mobile/**"
- "../../basango/apps/mobile/**"
- ".github/workflows/mobile_*.yaml"
jobs:
+43 -64
View File
@@ -1,10 +1,50 @@
node_modules
.pnp
.pnp.js
coverage
.next/
out/
next-env.d.ts
.expo/
dist/
build
.DS_Store
*.pem
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.env.local
.env.*.local
.env.*.local.*
.vercel
*.tsbuildinfo
.turbo
storybook-static
tailwind.css
.branches
.temp
.trigger
logs
*.log
pnpm-debug.log*
lerna-debug.log*
dist
dist-ssr
*.local
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/data/
.deptrac.cache
.nohup.out
.*.out
.DS_Store
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
@@ -12,83 +52,22 @@
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###
###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
###> lexik/jwt-authentication-bundle ###
/config/jwt/*.pem
###< lexik/jwt-authentication-bundle ###
.idea/
.vscode/
.ipynb_checkpoints/
*.pyc
.env.local
.env.*.local
var/
var/volumes/
var/volums/
.DS_Store
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
# Virtual environments
.venv
data/
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
expo-env.d.ts
# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.idea
.DS_Store
*.pem
# local env files
.env*.local
# typescript
*.tsbuildinfo
app-example
.env.local
.venv/
+8
View File
@@ -0,0 +1,8 @@
{
"recommendations": [
"expo.vscode-expo-tools",
"bradlc.vscode-tailwindcss",
"expo.vscode-expo-tools",
"yoavbls.pretty-ts-errors"
]
}
+30
View File
@@ -0,0 +1,30 @@
{
"editor.defaultFormatter": "biomejs.biome",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit",
"source.fixAll": "explicit",
"source.organizeImports": "explicit",
"source.sortMembers": "explicit"
},
"editor.formatOnSave": true,
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.autoImportFileExcludePatterns": [
"next/router.d.ts",
"next/dist/client/router.d.ts"
],
"terminal.integrated.localEchoStyle": "dim",
"search.exclude": {
"**/node_modules": true
}
}
-7
View File
@@ -1,7 +0,0 @@
# porting to Typescript (./basango)
- when working on a porting feature (working directory is basango, refer to docs/ for more instructions)
- make sure to use `bun` 1.3 as runtime not `node`
- prefer `const fn = () => {}` instead of `function`
# legacy (./projects)
- when working on a legacy feature (working director is projects)
+7 -2
View File
@@ -1,4 +1,7 @@
# Basango: Towards a scalable and intelligent system for Congolese News curation
# Basango
## Towards a scalable and intelligent system for Congolese News curation
---
[![backend audit](https://github.com/bernard-ng/basango/actions/workflows/backend_audit.yaml/badge.svg)](https://github.com/bernard-ng/basango/actions/workflows/backend_audit.yaml)
[![backend deploy](https://github.com/bernard-ng/basango/actions/workflows/backend_deploy.yaml/badge.svg)](https://github.com/bernard-ng/basango/actions/workflows/backend_deploy.yaml)
@@ -9,6 +12,8 @@
[![crawler tests](https://github.com/bernard-ng/basango/actions/workflows/crawler_tests.yml/badge.svg)](https://github.com/bernard-ng/basango/actions/workflows/crawler_tests.yml)
[![mobile quality](https://github.com/bernard-ng/basango/actions/workflows/mobile_quality.yaml/badge.svg)](https://github.com/bernard-ng/basango/actions/workflows/mobile_quality.yaml)
---
| Scope | Link |
|-------------------|-------------------------------------------|
| Crawler | [README.md](./projects/crawler/README.md) |
@@ -38,5 +43,5 @@ To ensure quality and reliability, the dataset prioritizes reputable news source
| congoactu.net | +10k | https://www.congoactu.net/ |
### Acknowledgment:
The compilation and curation of the "Basango" were conducted by Bernard Ngandu with the primary objective of facilitating research and analysis related to the Democratic Republic of Congo.
The compilation and curation of the "Basango" were conducted by Bernard Ngandu with the primary objective of facilitating research and analysis related to the Democratic Republic of Congo.
I do not own the content of the articles, and all rights belong to the respective publishers. The dataset is intended for non-commercial research purposes only.
+2 -2
View File
@@ -1,6 +1,6 @@
# Security
Contact: [security@basango.com](mailto:security@basango.com)
Contact: [security@basango.io](mailto:security@basango.io)
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
@@ -27,7 +27,7 @@ better protect our clients and our systems.
## Please do the following
- E-mail your findings to [security@basango.com](mailto:security@mbasango.com).
- E-mail your findings to [security@basango.io](mailto:security@mbasango.io).
- Do not run automated scanners on our infrastructure or dashboard. If you wish
to do this, contact us and we will set up a sandbox for you.
- Do not take advantage of the vulnerability or problem you have discovered,
@@ -18,7 +18,7 @@ help:
# -----------------------------------
FORCE:
.PHONY: build
build: ## Build & start docker containers for development
build: ## Build & start .docker containers for development
$(dc) build && \
$(dc) up -d
$(dc) run --rm php composer install && \
@@ -29,23 +29,23 @@ ssh: ## SSH into container
$(dc) exec php bash
.PHONY: start
start: ## Start docker containers
start: ## Start .docker containers
$(dc) --env-file .env.local up -d
.PHONY: restart
restart: ## Restart docker containers
restart: ## Restart .docker containers
$(dc) restart
.PHONY: stop
stop: ## Stop docker containers
stop: ## Stop .docker containers
$(dc) stop
.PHONY: logs
logs: ## Show logs of docker containers
logs: ## Show logs of .docker containers
@$(dc) logs --tail=0 --follow
.PHONY: destroy
destroy: ## Destroy docker containers
destroy: ## Destroy .docker containers
$(dc) kill && \
$(dc) rm -f
View File

Some files were not shown because too many files have changed in this diff Show More