replit-data-handling

Featured

Implement secure data handling on Replit: PostgreSQL, KV Database, Object Storage, and data security patterns. Use when handling sensitive data, connecting databases, implementing data access patterns, or ensuring secure data flow in Replit-hosted applications. Trigger with phrases like "replit data", "replit database", "replit PostgreSQL", "replit storage", "replit data security", "replit GDPR".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Replit Data Handling ## Overview Manage application data securely across Replit's three storage systems: PostgreSQL (relational), Key-Value Database (simple cache/state), and Object Storage (files/blobs). Covers connection patterns, security, data validation, and choosing the right storage for each use case. ## Prerequisites - Replit account with Workspace access - PostgreSQL provisioned in Database pane (for SQL use cases) - Understanding of Replit Secrets for credentials ## Storage Decision Matrix | Need | Storage | API | Limits | |------|---------|-----|--------| | Structured data, queries | PostgreSQL | `pg` npm / `psycopg2` | Plan-dependent | | Simple key-value, cache | Replit KV Database | `@replit/database` / `replit.db` | 50 MiB, 5K keys | | Files, images, backups | Object Storage | `@replit/object-storage` | Plan-dependent | ## Instructions ### Step 1: PostgreSQL — Secure Connection ```typescript // src/services/database.ts import { Pool, PoolConfig } from 'pg'; function createPool(): Pool { if (!process.env.DATABASE_URL) { throw new Error('DATABASE_URL not set. Create a database in the Database pane.'); } const config: PoolConfig = { connectionString: process.env.DATABASE_URL, ssl: { rejectUnauthorized: false }, // Required for Replit PostgreSQL max: 10, idleTimeoutMillis: 30000, connectionTimeoutMillis: 5000, }; const pool = new Pool(config); // Log errors without exposing connection string pool.on('error', (err) => ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category