Connecting to Bloqs Databases with MongoDB Compass
Bloqs uses MongoDB as its underlying data store for metadata. For development and debugging purposes, you can connect directly to the Bloqs databases using MongoDB Compass, a graphical user interface for MongoDB.
1. Prerequisites
MongoDB Compass: Download and install from https://www.mongodb.com/try/download/compass.
Running Bloqs Environment: Make sure your Bloqs instance is up and running.
Connection String: Obtain it from the Aspire dashboard that ships with Bloqs.
2. Locate the Connection String in Aspire
Start your Bloqs environment.
Open the Aspire dashboard.
Look for the MongoDB service entry.
Copy the connection string (it looks something like
mongodb://username:password@localhost:27017).

3. Connect Using MongoDB Compass
Launch MongoDB Compass.
Click “New Connection”.
Paste the connection string from the Aspire dashboard.
Click Connect.
4. Browsing the Databases
Once connected, you can:
View databases: Each Bloqs app and tenant stores data in MongoDB collections.
Browse collections: Explore the underlying documents representing your entities.
Run queries: Use Compass’ query editor to filter or search data.
Inspect models: Verify how your model-driven entities are stored.

5. Best Practices
Read-Only Use: Use Compass mainly for inspection and troubleshooting. Avoid modifying or deleting data directly, as this can lead to inconsistencies.
Use App Logic for Changes: Prefer creating, updating, or deleting entities through your Bloqs app logic instead of manual changes.
Secure Access: Treat the connection string as sensitive information (since it includes credentials).
Key Points
Bloqs uses MongoDB for its data storage.
Use MongoDB Compass to connect and browse data.
The connection string can be found in the Aspire dashboard.
Compass allows you to explore databases, collections, and documents.
Use Compass for inspection only — make changes through your app logic.
Last updated