Engineering Architecture August 24, 2026

Server security and API testing

How we protect server files, separate API traffic, and test new endpoints.

Key Engineering Milestones

Zero-Trust File Barrier: Real-time URL normalization and path traversal blocking.
api.microbix.in Gateway: Clean separation of programmatic API traffic from web apps.
Active API Preview Testing: The API may return a 503 response while preview testing is in progress.
Mobile Vertical Stacking: Zero-overflow responsive chat layouts across all viewports.

1. Protecting server files

Server code, internal instructions, and database credentials must stay private.

The access checks in server.js work in several stages:

// Zero-Trust Security Middleware
app.use((req, res, next) => {
    const urlPart = (req.originalUrl || req.url || '').split('?')[0].split('#')[0];
    const rawPath = decodeURIComponent(urlPart).toLowerCase().trim().replace(/\0/g, '');
    const normalized = path.normalize(rawPath).replace(/\\/g, '/');

    // Block path traversal and dotfiles
    if (rawPath.includes('..') || rawPath.includes('/.') || rawPath.startsWith('.')) {
        return res.status(403).json({ error: "Forbidden: Not Authorized." });
    }
    next();
});

2. The API gateway

To keep responses fast and separate different kinds of requests, we launched https://api.microbix.in as our official API gateway domain.

microbix.in
Corporate & Docs

Research papers, engineering news, and documentation.

aether.microbix.in
Aether Workspace

Browser-native OS, team war-rooms, and real-time voice.

api.microbix.in
Neural API Gateway

Programmatic REST endpoints and developer SDK routing.

3. Testing the API

The API is undergoing developer testing. Unreleased endpoints return a structured JSON response during this phase:

{
  "error": {
    "message": "Microbix and Aether APIs are currently in active testing, and are not available right now. Public access will be available soon.",
    "type": "api_preview_unavailable",
    "code": "service_in_testing",
    "status": 503,
    "documentation": "https://microbix.in/docs/api-reference",
    "console": "https://console.microbix.in",
    "system_status": "https://microbix.in/status"
  }
}

Developers can explore full schemas in the API Reference Documentation and configure keys via the Developer Console.

4. Handling missing pages

Missing pages show a clear error message and a route back to the site.

ESC