Security Beyond Encryption: Building a Safe Modern Web Application
It would seem that everyone can ship software faster than ever
With AI-assisted development, founders can go from idea to production in days instead of months. That's exciting, but it also means more applications are being deployed by teams without dedicated infrastructure or security experience
Security isn't a feature you add at the end. It's a collection of engineering decisions made throughout the lifecycle of your application
Sharing the best practices that we use at markkët, industry principles that help reduce operational risk while keeping infrastructure simple enough for small teams
1. Source Control and CI/CD
Using Git & Github so changes are reviewed, automatically built, and tested before deployment. Dependency scanning and automated code analysis help identify vulnerable packages or accidental secret leaks before they reach production
Automation can review many files and scenarios at once and catch the mistakes humans inevitably make
2. Don't Put Secrets in Your Frontend
API keys, database credentials, and signing secrets should never be embedded in client applications
Instead, client applications communicate with backend APIs, which perform privileged operations securely on the server. Modern frameworks such as Next.js and Astro make this architecture straightforward while keeping sensitive credentials off users' devices
3. Use Managed Infrastructure
Running your own database server sounds fun until it's 3 AM and the disk fills up
Cloud providers like DigitalOcean, AWS, Azure, and Google Cloud provide managed databases, object storage, automated backups, monitoring, and network controls that would otherwise take significant engineering effort to build yourself
4. Keep Private Systems Private
Not every service should be exposed to the public internet
Databases, object storage, and internal services are typically protected behind network restrictions and accessed only through authenticated application servers or managed APIs. Reducing your public attack surface is one of the simplest ways to improve security
Supabase, a Postgres wrapper, is a popular alternative for vibe coded apps and uses Row Level Security (RLS) to enable granular control of data access
5. Encrypt Sensitive Data
Encryption protects information while it's stored and while it's traveling across the internet. Credentials, API secrets, tokens, and other sensitive configuration should be encrypted and managed securely
For industries such as healthcare and finance, additional regulatory requirements may apply, including HIPAA, PCI DSS, GDPR, and other privacy frameworks
6. Protect User Privacy
Application logs are incredibly useful for debugging
They're also one of the easiest places to accidentally leak customer information. Good engineering practices include minimizing personal information in logs, redacting sensitive values, and carefully reviewing which third-party analytics or monitoring platforms receive production data
7. Build on Trusted Services
Most startups shouldn't build their own payment processor, email infrastructure, SMS gateway, or identity verification system
Specialized providers invest enormous resources into security, compliance, fraud prevention, and reliability
That's why many startups rely on services like:
- Stripe for payments
- SendGrid for transactional email
- Twilio for messaging
- Supabase or managed databases for authentication and storage
Using trusted providers allows small engineering teams to focus on building products instead of reimplementing complex infrastructure
8. AI Changes the Equation
AI claims to have made software development dramatically more accessible, it has also made it easier to accidentally deploy insecure code
Any application, human or machine generated, requires an architectural and security review before handling customer data or financial transactions
Common issues include:
- Exposed secrets
- Missing authorization checks
- Overly permissive database permissions
- Insecure webhook handling
- Dependency vulnerabilities
- Missing monitoring and backups
Fortunately, these problems are usually straightforward to identify and fix by a friend or external reviewer
Security Is a Process
No application is perfectly secure, the goal isn't perfection; the goal is to reduce risk over time through thoughtful architecture, regular reviews, and continuous improvement
For founders, especially those building quickly with AI-assisted tools, periodic engineering health checks can provide confidence that the product is ready to grow safely
