
- 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.
env-paths
Get paths for storing things like data, config, cache, etc
Uses the correct OS-specific paths. Most developers get this wrong.
Install
$ npm install env-paths
Usage
const envPaths = require('env-paths');
const paths = envPaths('MyApp');
paths.data;
//=> '/home/sindresorhus/.local/share/MyApp-nodejs'
paths.config
//=> '/home/sindresorhus/.config/MyApp-nodejs'
API
paths = envPaths(name, options?)
Note: It only generates the path strings. It doesn't create the directories for you. You could use make-dir
to create the directories.
name
Type: string
Name of your project. Used to generate the paths.
options
Type: object
suffix
Type: string
Default: 'nodejs'
Don't use this option unless you really have to!
Suffix appended to the project name to avoid name conflicts with native
apps. Pass an empty string to disable it.
paths.data
Directory for data files.
Example locations (with the default nodejs
suffix):
- macOS:
~/Library/Application Support/MyApp-nodejs
- Windows:
%LOCALAPPDATA%\MyApp-nodejs\Data
(for example,C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data
) - Linux:
~/.local/share/MyApp-nodejs
(or$XDG_DATA_HOME/MyApp-nodejs
)
paths.config
Directory for config files.
Example locations (with the default nodejs
suffix):
- macOS:
~/Library/Preferences/MyApp-nodejs
- Windows:
%APPDATA%\MyApp-nodejs\Config
(for example,C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config
) - Linux:
~/.config/MyApp-nodejs
(or$XDG_CONFIG_HOME/MyApp-nodejs
)
paths.cache
Directory for non-essential data files.
Example locations (with the default nodejs
suffix):
- macOS:
~/Library/Caches/MyApp-nodejs
- Windows:
%LOCALAPPDATA%\MyApp-nodejs\Cache
(for example,C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache
) - Linux:
~/.cache/MyApp-nodejs
(or$XDG_CACHE_HOME/MyApp-nodejs
)
paths.log
Directory for log files.
Example locations (with the default nodejs
suffix):
- macOS:
~/Library/Logs/MyApp-nodejs
- Windows:
%LOCALAPPDATA%\MyApp-nodejs\Log
(for example,C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log
) - Linux:
~/.local/state/MyApp-nodejs
(or$XDG_STATE_HOME/MyApp-nodejs
)
paths.temp
Directory for temporary files.
Example locations (with the default nodejs
suffix):
- macOS:
/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs
- Windows:
%LOCALAPPDATA%\Temp\MyApp-nodejs
(for example,C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs
) - Linux:
/tmp/USERNAME/MyApp-nodejs
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.