crowd.rocks is a server/client version of a peer-to-peer research project.
Differences:
Commands are run from each project folder (env
, api
, frontend
, infra
).
docker-compose --env-file .env up -d
docker logs -f env_postgres_1_1
Note:
If you don't see SQL statementes being logged, most likely your postgres docker image was built earlier. So you should rebuild and start container again:
-change directory to env (containing docker-compose.yml): cd ../env
-rebuild docker-compose build
and start containers: docker-compose --env-file .env up -d
use postgres tools or pgadmin or any other tool to execute command:
CREATE EXTENSION pldbgapi
Check current postgers config file:
SHOW config_file;
it shoud be '/etc/postgresql.conf'. If not - something gone wrong with posgtres image build. Try to rebuild them:
docker-compose build
Now you can use pgadmin to debug plpgsql procedures/functions.
yarn set version berry
then yarn
yarn dlx @yarnpkg/sdks vscode
yarn run start --watch
http://localhost:3000/graphql
Frontend is Ionic React
npm install -g @ionic/cli
npm i
ionic serve
or npm run dev
There may be times when capacitor builds at a different api level than what Android Studio uses. At least right now, it's building Android apps at the SDK version 33, when the Android Studio is at 34. Just for now you can change the following in variables.gradle if you have capacitor generate android app:
// generated was 33
compileSdkVersion = 34
targetSdkVersion = 34
./api/src/core/sql/schema/v1.schema.sql
.core/database-version.control.service.ts
file as needed when adding new DB functions.components
folder as needed.npm run codegen
on the frontend to generate the new types within the frontend project.There some imports in the API and Frontend which rely on utils/dist folder. So, if anything in the utils lib was changed, utils should be rebuilt to allow these changes be imported by API and Frontend:
$ cd utils
$ npm run build
Its also a good idea to run npm run codegen
on the frontend if you have messed around
with GraphQL types anywhere