FastKit is a developer-first, modular, and type-safe toolkit for building modern applications with authentication, database management, and configuration handling out of the box.
✅ Authentication Module – Complete auth system with controllers and services
✅ Database Config – Multi-database support with type-safe configurations
✅ Environment Management – Automated environment setup and configuration
✅ TypeScript First – Full type safety across all modules
✅ Framework Agnostic – Use with Express, Fastify, or any Node.js framework
✅ Tree-shakable – Import only what you need for optimal bundle size
npm install @nexgenstudiodev/fastkit- Node.js 16+
- TypeScript 4.5+ (for TypeScript projects)
- 🔐 Complete Auth System – Login, register, JWT handling, password reset
- �️ Multi-Database Support – MongoDB, PostgreSQL, MySQL, SQLite, Redis
- ⚙️ Smart Configuration – Environment-based config with auto-generation
- 🧩 Modular Architecture – Use individual modules or the complete package
- 🌍 Universal Compatibility – Works with CommonJS, ES Modules, and TypeScript
- 📝 Type Safety – Full TypeScript support with comprehensive type definitions
FastKit/
├── package.json (root)
├── pnpm-workspace.yaml
└── src/
└── packages/
├── fastkit
├── fastkit-config
├── fastkit-db-config
└── fastkit-auth
# Using npm
npm install @nexgenstudiodev/fastkit
# Using pnpm
pnpm add @nexgenstudiodev/fastkit
# Using yarn
yarn add @nexgenstudiodev/fastkitconstexpress=require('express');const{
auth,
config,
db,
AuthController,
setup_FastKit_EnvFiles,}=require('@nexgenstudiodev/fastkit');constapp=express();// Setup environment filessetup_FastKit_EnvFiles();// Use auth controllerapp.post('/api/auth/login',auth.AuthController.login);app.post('/api/auth/register',auth.AuthController.register);// Database configurationconstdbConfig={type: 'mongodb',url: process.env.DATABASE_URL||'mongodb://localhost:27017/myapp',};app.listen(3000,()=>{console.log('FastKit app running on port 3000');});importexpressfrom'express';import{auth,config,db,AuthController,setup_FastKit_EnvFiles,FastKit,}from'@nexgenstudiodev/fastkit';constapp=express();// Setup environment and configurationsetup_FastKit_EnvFiles();constappConfig=newFastKit();// Authentication routesapp.post('/api/auth/login',AuthController.login);app.post('/api/auth/register',AuthController.register);app.post('/api/auth/logout',AuthController.logout);// Database setupconstdbConfig={type: 'postgresql',host: 'localhost',port: 5432,databaseName: 'myapp',};app.listen(3000,()=>{console.log('FastKit app running on port 3000');});importexpress,{Request,Response}from'express';import{auth,config,db,AuthController,AuthService,setup_FastKit_EnvFiles,FastKit,DatabaseConfig,DatabaseType,Config_Type,}from'@nexgenstudiodev/fastkit';constapp=express();// Type-safe configurationsetup_FastKit_EnvFiles();constappConfig: Config_Type=newFastKit({database: {type: 'mongodb',url: process.env.DATABASE_URL,},auth: {jwtSecret: process.env.JWT_SECRET||'fallback-secret',expiresIn: '7d',},});// Type-safe database configurationconstdbConfig: DatabaseConfig={type: 'postgresql'asDatabaseType,host: 'localhost',port: 5432,username: 'admin',password: 'password',databaseName: 'myapp',ssl: true,};// Authentication with full type supportapp.post('/api/auth/login',AuthController.login);app.post('/api/auth/register',AuthController.register);app.listen(3000,()=>{console.log('TypeScript FastKit app running on port 3000');});Complete authentication system with controllers, services, and utilities.
Key Features:
- Login/Register endpoints
- JWT token management
- Password reset functionality
- Authentication middleware
Quick Usage:
import{AuthController,AuthService}from'@nexgenstudiodev/fastkit';// Use pre-built controllersapp.post('/login',AuthController.login);Smart configuration management with environment handling.
Key Features:
- Automatic environment file generation
- Type-safe configuration objects
- Environment-specific settings
- Configuration validation
Quick Usage:
import{setup_FastKit_EnvFiles,FastKit}from'@nexgenstudiodev/fastkit';// Auto-generate .env filessetup_FastKit_EnvFiles();// Type-safe configurationconstconfig=newFastKit();Multi-database support with type-safe configurations.
Key Features:
- Support for MongoDB, PostgreSQL, MySQL, SQLite, Redis
- Type-safe database configurations
- Connection string generation
- Environment-based setup
Quick Usage:
import{DatabaseConfig,DatabaseType}from'@nexgenstudiodev/fastkit';constdbConfig: DatabaseConfig={type: 'mongodb',url: process.env.DATABASE_URL,options: {useNewUrlParser: true}};📖 Full Database Config Documentation
FastKit supports multiple import patterns for maximum flexibility:
// Everything from main packageimport{auth,config,db,AuthController,FastKit}from'@nexgenstudiodev/fastkit';// Import only what you needimport{AuthController}from'@nexgenstudiodev/fastkit/auth';import{FastKit}from'@nexgenstudiodev/fastkit/config';import{DatabaseConfig}from'@nexgenstudiodev/fastkit/db';// Organized by moduleimport{auth,config,db}from'@nexgenstudiodev/fastkit';constcontroller=auth.AuthController;constdbConfig=db.DatabaseConfig;// server.jsimportexpressfrom'express';constapp=express();import{FastKit,setup_FastKit_EnvFiles,Config_Type}from'@nexgenstudiodev/fastkit/config';setup_FastKit_EnvFiles();constfastKit=newFastKit(app);fastKit.get('/',(req,res)=>{res.send('Hello World!');});fastKit.listen(3000,()=>{console.log('Server is running on http://localhost:3000');});// apiRoutes.tsimport{fastKit}from'./fastkit';import{authController}from'./features/Auth/v1/Auth.controller';import{verifyToken}from'./middlewares/verifyToken';import{SendResponse}from'./utils/SendResponse';fastKit.get('/ping',(req,res)=>{SendResponse.success(res,'Pong!');});fastKit.post('/auth/signup',authController.signup);fastKit.get('/auth/me',verifyToken,authController.getProfile);fastKit.post('/auth/login',authController.login);import{EmailService}from'./services/email/v1/Email.service';awaitEmailService.sendOtp(email);fastKit.get('/user',verifyToken,userController.getUserById);SendResponse.success(res,'Your API works!');SendResponse.error(res,'Something went wrong',400);- Auth systems (JWT, OTP, social logins)
- Todo, Notes, Blog, Folder/File systems
- File Uploads & Content Management
- Payment integration (Stripe, Razorpay)
- Reminder & Notification system (NodeMailer, Cron)
- AI assistants via OpenAI API
- WebSocket / Realtime apps with Socket.io
- Admin panels with RBAC (roles/permissions)
You can export every module individually and use them in any project:
import{AuthController}from'fastkit-auth';import{TodoController}from'fastkit-todo';verifyToken– Protect routes using JWTvalidateBody(schema)– Validate input with Zod or JoiallowRoles('admin', 'user')– Role-based access control
EmailService.sendOtp(email,template);EmailService.sendCustom(subject,message,to);EmailService.sendReminder(userId,date,content);- Create Folder
- Create File Inside Folder (supports custom extensions)
- Delete Folder (with restriction middleware)
- Nested Folders support
- Folder Flags:
isLocked,isShared, etc.
- Works with both HTTP and Socket.io
- Real-time APIs using FastKit + Socket.io events supported
- ✅ Ensure all packages extend the root tsconfig.base.json:
{
"extends": "../../tsconfig.base.json"
}npm version patch # Bump version first using:
pnpm publish --tag beta # publish with a tag:rm -rf node_modules pnpm-lock.yaml package-lock.json
pnpm install- Abhishek Kumar - Initial work - @abhishek-nexgen-dev
- Built with Express.js
- Powered by TypeScript
- Inspired by modern API development practices
- 📧 Email: abhishek.nexgen.dev@gmail.com
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
Want to add more features or modules like:
- Blog/Post
- Cart
- Analytics
- AI Tools
- Chat
Create a PR or open an issue!
MIT © Abhishek Gupta