skills/ballee/mongodb-production-query/SKILL.md
Query Ballee production MongoDB (Meteor app) using .env.local credentials; use when debugging Meteor data, verifying MongoDB documents, investigating sync issues, or exploring legacy data for migration
npx skillsauth add javeedishaq/ai-workflow-orchestrator mongodb-production-queryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query the Ballee production MongoDB database (Meteor application) safely using credentials from .env.local (with 1Password reference).
Use this skill when:
| Environment | Host | Database | Auth |
|-------------|------|----------|------|
| Production | mdb-p-{0,1,2}.ballee.db-eu2.zcloud.ws | meteor | authSource=admin |
mdb-p (3 nodes)ssl=true&tlsInsecure=true).claude/skills/mongodb-production-query/ca-eu-2.pemCredentials stored in apps/web/.env.local:
METEOR_MONGO_URL="op://Ballee/MongoDB Production (zCloud)/connection string"
| Credential | 1Password Item | Field |
|------------|----------------|-------|
| Connection String | MongoDB Production (zCloud) | connection string |
| Username | MongoDB Production (zCloud) | username |
| Password | MongoDB Production (zCloud) | password |
mongodb package installed.env.local OR 1Password CLI authenticated (op whoami)const { MongoClient } = require('mongodb');
const url = process.env.METEOR_MONGO_URL ||
'mongodb://root:<password>@mdb-p-0.ballee.db-eu2.zcloud.ws:60601,mdb-p-1.ballee.db-eu2.zcloud.ws:60602,mdb-p-2.ballee.db-eu2.zcloud.ws:60603/meteor?authSource=admin&ssl=true&tlsInsecure=true&replicaSet=mdb-p';
async function connect() {
const client = new MongoClient(url);
await client.connect();
return client.db('meteor');
}
const db = await connect();
const collections = await db.listCollections().toArray();
console.log(collections.map(c => c.name));
const db = await connect();
const count = await db.collection('Organizations').countDocuments();
console.log('Organizations:', count);
cd /Users/antoineschaller/GitHub/ballee-community-app && node -e "
const { MongoClient } = require('mongodb');
const url = process.env.METEOR_MONGO_URL;
async function test() {
const client = new MongoClient(url, { serverSelectionTimeoutMS: 10000 });
await client.connect();
const db = client.db('meteor');
const collections = await db.listCollections().toArray();
console.log('Collections:', collections.map(c => c.name).join(', '));
await client.close();
}
test().catch(console.error);
"
| Collection | Description | Approx Count |
|------------|-------------|--------------|
| Organizations | Dance schools, companies | ~428 |
| Candidates | Dancer profiles | ~20,018 |
| Posts | Social posts | ~1,492 |
| Experiences | Work/education history | varies |
| Media | Photos, videos, headshots | varies |
| Comments | Post comments | varies |
| Likes | Post/comment likes | varies |
| Follow | User follows | varies |
| users | Meteor auth users | varies |
const org = await db.collection('Organizations')
.findOne({ name: /fever/i });
console.log(org);
const candidate = await db.collection('Candidates')
.findOne({ 'emails.address': '[email protected]' });
console.log(candidate);
const collections = ['Organizations', 'Candidates', 'Posts', 'Experiences', 'Media', 'Comments', 'Likes', 'Follow'];
for (const coll of collections) {
const count = await db.collection(coll).countDocuments();
console.log(`${coll}: ${count}`);
}
// Get sample document to understand schema
const sample = await db.collection('Candidates').findOne();
console.log(JSON.stringify(sample, null, 2));
const recent = await db.collection('Posts')
.find()
.sort({ 'meta.createdAt': -1 })
.limit(10)
.toArray();
console.log(recent);
| Meteor Field | Supabase Field | Notes |
|--------------|----------------|-------|
| _id | meteor_id | Store original ID |
| meta.createdAt | created_at | Timestamp |
| meta.modifiedAt | updated_at | Timestamp |
| name | name | Direct mapping |
| camelCase | snake_case | Transform field names |
apps/web/app/admin/sync/meteor/.claude/plans/dreamy-wiggling-emerson.mdscripts/migration/.claude/skills/airtable-sync-specialist/SKILL.mdtools
# Test Patterns Testing patterns for reliable, maintainable, and fast tests. > **Template Usage:** Customize for your test framework (Vitest, Jest, Playwright, etc.) and assertion library. ## Test Structure ```typescript // user.test.ts import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { userService } from '@/services/user.service'; import { createTestUser, cleanupTestData } from '@/tests/helpers'; describe('UserService', () => { let testUserId: string; befor
tools
# State Management Patterns Client-side state management patterns for modern applications. > **Template Usage:** Customize for your state library (React Query, Zustand, Jotai, Redux, etc.). ## State Categories | Type | Description | Solution | |------|-------------|----------| | **Server State** | Data from API/database | React Query, SWR | | **Client State** | UI state, user preferences | Zustand, Jotai, useState | | **Form State** | Form inputs, validation | React Hook Form, Formik | | **U
development
# Service Patterns Service layer patterns for clean architecture with proper error handling, logging, and type safety. > **Template Usage:** Customize for your ORM (Prisma, Drizzle, TypeORM, etc.) and logging solution. ## Result Type Pattern Never throw exceptions from services. Always return a Result type. ```typescript // lib/result.ts export type Result<T, E = Error> = | { success: true; data: T } | { success: false; error: E }; export function ok<T>(data: T): Result<T, never> { r
testing
# Row-Level Security Patterns Database security patterns for multi-tenant and user-scoped data. > **Template Usage:** Customize for your database (PostgreSQL, Supabase, etc.) and auth system. ## RLS Fundamentals ### Enable RLS on Tables ```sql -- Enable RLS (required before policies take effect) ALTER TABLE users ENABLE ROW LEVEL SECURITY; ALTER TABLE posts ENABLE ROW LEVEL SECURITY; ALTER TABLE comments ENABLE ROW LEVEL SECURITY; -- Force RLS for table owners too (recommended) ALTER TABLE