feat: MVP implementation — MCP server, partner one-pager, legal docs
Code (code/): - TypeScript MCP server with 5 tools (business info, hours, services, booking, related) - PostgreSQL schema with pilot business seed data - /.well-known/mcp-server manifest generator - Railway deployment config (Dockerfile, railway.json) - Multi-tenant gateway placeholder GTM (docs/gtm/): - Partner One-Pager: agency sales asset with economics, onboarding, competitive comparison Legal (docs/legal/): - Data Flow & Privacy: data collection, storage, sharing, GDPR/CCPA commitments - Partnership Agreement Skeleton: template for agency/CoC partnerships - IP Notes: well-known convention positioning, telemetry ownership, open-source strategy
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { pool } from '../db/schema.js';
|
||||
|
||||
export async function getBusinessInfo(params: { slug: string }): Promise<Record<string, any>> {
|
||||
const result = await pool.query(
|
||||
`SELECT name, category, address, city, state, zip, phone, website, story, owner_bio, photos
|
||||
FROM businesses WHERE slug = $1`,
|
||||
[params.slug]
|
||||
);
|
||||
|
||||
if (result.rows.length === 0) {
|
||||
return { error: `Business '${params.slug}' not found` };
|
||||
}
|
||||
|
||||
const b = result.rows[0];
|
||||
return {
|
||||
name: b.name,
|
||||
category: b.category,
|
||||
location: { address: b.address, city: b.city, state: b.state, zip: b.zip },
|
||||
phone: b.phone,
|
||||
website: b.website,
|
||||
story: b.story,
|
||||
owner_bio: b.owner_bio,
|
||||
photos: JSON.parse(b.photos),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user