Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@bloom-housing/backend-core
Advanced tools
Listings service reference implementation for the Bloom affordable housing system
This package is a NestJS application that provides a core set of backend services via REST API endpoints to apps using the Bloom Housing framework. Information is stored in a Postgres database, accessed via TypeORM.
OpenAPI (fka Swagger) documentation is automatically generated by the server at http://localhost:3100/docs/
for a standard local development environment. A raw JSON version of the schema is also available at /docs-json/
, suitable for API client code generation or other code-based consumers.
The following steps should provide a working local environement for development purposes:
Operational configuration the service is read from environment variables. Copy .env.template
to .env
and edit the settings specific to your development environment. Make sure the Database URL and Test Database URL match your Postgres configuration.
You can install Postgres using Homebrew with the following command: brew install postgresql
.
There are two databases used in this project: bloom
and bloom_test
. First is used every time you are starting a project with yarn dev
and second one is only used in end-to-end tests. Corresponding TypeORM configs are defined in ormconfig.ts
and ormconfig.test.ts
.
If you are just starting to work with the projects it's best to simply run:
yarn && yarn db:reseed
that will create bloom
DB for you, migrate it to the latest schema and seed with appropriate dev data. If running the reseed command requires that you input a password for Postgres, set the following environment variables: PGUSER
to postgres and PGPASSWORD
to the default password you inputted for the postgres user during Postgres installation.
Dropping the DB:
yarn db:drop
Creating the DB:
yarn db:create
Seeding the DB:
yarn db:seed
Generating a new migration:
yarn db:migration:generate
Applying migrations:
yarn db:migration:run
You can install Redis using Homebrew with the following command: brew install redis
.
To start Redis:
redis-server
.
To have launch Redis as background service and restart at login:
brew services start redis
.
Test if Redis is working:
redis-cli ping
You can connect a debugger to the backend by starting the backend server with yarn debug
.
To connect to it from VS Code, add a configuration to launch.json that looks like
{
"name": "Attach to Backend",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"restart": true
},
End-to-end tests:
yarn test:e2e:local
Unit tests:
yarn test
Backend keeps translations for email related content in the DB in table translations
.
There is an endpoint /translations
exposing CRUD operations on this table (admin only).
Translations are defined for each county code and language pair e.g. (Alameda, en). To modify a particular
translation pair:
GET /translations
and list all the translationsPUT /translations/:translationId
to modify it's contentFAQs
Listings service reference implementation for the Bloom affordable housing system
The npm package @bloom-housing/backend-core receives a total of 3 weekly downloads. As such, @bloom-housing/backend-core popularity was classified as not popular.
We found that @bloom-housing/backend-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.