
- Complete NestJS TypeScript implementation with WebSocket support - Direct messaging (DM) and group chat functionality - End-to-end encryption with AES encryption and key pairs - Media file support (images, videos, audio, documents) up to 100MB - Push notifications with Firebase Cloud Messaging integration - Mention alerts and real-time typing indicators - User authentication with JWT and Passport - SQLite database with TypeORM entities and relationships - Comprehensive API documentation with Swagger/OpenAPI - File upload handling with secure access control - Online/offline status tracking and presence management - Message editing, deletion, and reply functionality - Notification management with automatic cleanup - Health check endpoint for monitoring - CORS configuration for cross-origin requests - Environment-based configuration management - Structured for Flutter SDK integration Features implemented: ✅ Real-time messaging with Socket.IO ✅ User registration and authentication ✅ Direct messages and group chats ✅ Media file uploads and management ✅ End-to-end encryption ✅ Push notifications ✅ Mention alerts ✅ Typing indicators ✅ Message read receipts ✅ Online status tracking ✅ File access control ✅ Comprehensive API documentation Ready for Flutter SDK development and production deployment.
@protobufjs/codegen
A minimalistic code generation utility.
API
-
codegen([functionParams:
string[]
], [functionName: string]):Codegen
Begins generating a function. -
codegen.verbose =
false
When set to true, codegen will log generated code to console. Useful for debugging.
Invoking codegen returns an appender function that appends code to the function's body and returns itself:
-
Codegen(formatString:
string
, [...formatParams:any
]): Codegen
Appends code to the function's body. The format string can contain placeholders specifying the types of inserted format parameters:%d
: Number (integer or floating point value)%f
: Floating point value%i
: Integer value%j
: JSON.stringify'ed value%s
: String value%%
: Percent sign
-
Codegen([scope:
Object.<string,*>
]):Function
Finishes the function and returns it. -
Codegen.toString([functionNameOverride:
string
]):string
Returns the function as a string.
Example
var codegen = require("@protobufjs/codegen");
var add = codegen(["a", "b"], "add") // A function with parameters "a" and "b" named "add"
("// awesome comment") // adds the line to the function's body
("return a + b - c + %d", 1) // replaces %d with 1 and adds the line to the body
({ c: 1 }); // adds "c" with a value of 1 to the function's scope
console.log(add.toString()); // function add(a, b) { return a + b - c + 1 }
console.log(add(1, 2)); // calculates 1 + 2 - 1 + 1 = 3
License: BSD 3-Clause License