Skip to content

Commit 2aeefa1

Browse files
feat: remove unused files and add initial implementations for Admin and SuperAdmin modules
1 parent 74de536 commit 2aeefa1

73 files changed

Lines changed: 1721 additions & 1687 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.FastKit

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ============================
2+
# Server Configuration
3+
# ============================
4+
PORT=8000 # The port your server will run on
5+
6+
# ============================
7+
# Database Configuration
8+
# ============================
9+
MONGO_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/<dbname>?retryWrites=true&w=majority
10+
DB_NAME=your_database_name # The name of your database
11+
12+
# ============================
13+
# SuperAdmin Credentials
14+
# ============================
15+
SUPERADMIN_NAME=your_superadmin_name
16+
SUPERADMIN_EMAIL=your_superadmin_email@example.com
17+
SUPERADMIN_PASSWORD=your_superadmin_password # Use a strong password for production
18+
19+
# ============================
20+
# Security Keys
21+
# ============================
22+
PUBLIC_KEY="
23+
-----BEGIN PUBLIC KEY-----
24+
<your_public_key_here>
25+
-----END PUBLIC KEY-----"
26+
PRIVATE_KEY="
27+
-----BEGIN PRIVATE KEY-----
28+
<your_private_key_here>
29+
-----END PRIVATE KEY-----"
30+
31+
# ============================
32+
# JWT Configuration
33+
# ============================
34+
JWT_SECRET=your_jwt_secret # Use a strong, randomly generated secret for production
35+
36+
# ============================
37+
# Additional Configuration
38+
# ============================
39+
NODE_ENV=production # Set to 'production' for production environments
40+
LOG_LEVEL=info # Logging level (e.g., debug, info, warn, error)

.env.FastKit.example

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ============================
2+
# Server Configuration
3+
# ============================
4+
PORT=8000 # The port your server will run on
5+
6+
# ============================
7+
# Database Configuration
8+
# ============================
9+
MONGO_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/<dbname>?retryWrites=true&w=majority
10+
DB_NAME=your_database_name # The name of your database
11+
12+
# ============================
13+
# SuperAdmin Credentials
14+
# ============================
15+
SUPERADMIN_NAME=your_superadmin_name
16+
SUPERADMIN_EMAIL=your_superadmin_email@example.com
17+
SUPERADMIN_PASSWORD=your_superadmin_password # Use a strong password for production
18+
19+
# ============================
20+
# Security Keys
21+
# ============================
22+
PUBLIC_KEY="
23+
-----BEGIN PUBLIC KEY-----
24+
<your_public_key_here>
25+
-----END PUBLIC KEY-----"
26+
PRIVATE_KEY="
27+
-----BEGIN PRIVATE KEY-----
28+
<your_private_key_here>
29+
-----END PRIVATE KEY-----"
30+
31+
# ============================
32+
# JWT Configuration
33+
# ============================
34+
JWT_SECRET=your_jwt_secret # Use a strong, randomly generated secret for production
35+
36+
# ============================
37+
# Additional Configuration
38+
# ============================
39+
NODE_ENV=production # Set to 'production' for production environments
40+
LOG_LEVEL=info # Logging level (e.g., debug, info, warn, error)

package.json

Lines changed: 24 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "@nexgenstudiodev/fastkit",
3-
43
"type": "commonjs",
54
"version": "1.2.0",
65
"description": "A modular, class-based toolkit for fast API development with TypeScript and Express.",
@@ -9,17 +8,24 @@
98
"files": [
109
"dist"
1110
],
12-
1311
"scripts": {
14-
"format": "prettier --write 'src/**/*.{ts,tsx,js,json,md}'",
15-
"lint": "eslint src/**/*.{ts,tsx}",
16-
"lint:fix": "eslint src/**/*.{ts,tsx} --fix",
17-
"link": "npm link @nexgenstudiodev/fastkit",
18-
"build": "tsc && pnpm exec tsc-alias",
19-
"link:manage": "ts-node src/script/manage-link.ts",
20-
"manage": "ts-node src/script/index.ts"
12+
"clean": "rimraf dist",
13+
"build": "pnpm -r run build && tsc && tsc-alias",
14+
"dev": "ts-node-dev --respawn --transpile-only --ignore-watch node_modules --ignore-watch dist src/FastKit.ts",
15+
"build:main": "tsc && tsc-alias",
16+
"rebuild": "pnpm -r run clean && pnpm -r run build",
17+
"lint": "pnpm -r run lint",
18+
"lint:fix": "pnpm -r run lint:fix",
19+
"format": "pnpm -r run format",
20+
"test": "pnpm -r run test",
21+
"test:watch": "pnpm -r run test:watch",
22+
"test:coverage": "pnpm -r run test:coverage",
23+
"sync:versions": "npx npm-check-updates --workspace --dep=prod --upgrade --filter /@nexgenstudiodev/*/",
24+
"sync:dev-versions": "npx npm-check-updates --workspace --dep=dev --upgrade --filter /@nexgenstudiodev/*/",
25+
"sync:all-versions": "pnpm run sync:versions && pnpm run sync:dev-versions",
26+
"publish:all": "pnpm -r publish --access public --no-git-checks",
27+
"postinstall": "pnpm -r run build"
2128
},
22-
2329
"keywords": [
2430
"fastkit",
2531
"auth",
@@ -38,48 +44,17 @@
3844
"workspaces": [
3945
"packages/*"
4046
],
41-
"scripts": {
42-
"clean": "rimraf dist",
43-
"build": "pnpm -r run build && tsc && tsc-alias",
44-
"build:main": "tsc && tsc-alias",
45-
"rebuild": "pnpm -r run clean && pnpm -r run build",
46-
"lint": "pnpm -r run lint",
47-
"lint:fix": "pnpm -r run lint:fix",
48-
"format": "pnpm -r run format",
49-
"test": "pnpm -r run test",
50-
"test:watch": "pnpm -r run test:watch",
51-
"test:coverage": "pnpm -r run test:coverage",
52-
"sync:versions": "npx npm-check-updates --workspace --dep=prod --upgrade --filter /@nexgenstudiodev/*/",
53-
"sync:dev-versions": "npx npm-check-updates --workspace --dep=dev --upgrade --filter /@nexgenstudiodev/*/",
54-
"sync:all-versions": "pnpm run sync:versions && pnpm run sync:dev-versions",
55-
"publish:all": "pnpm -r publish --access public --no-git-checks",
56-
"postinstall": "pnpm -r run build"
57-
},
58-
"exports": {
59-
".": {
60-
"import": "./dist/FastKit.js",
61-
"require": "./dist/FastKit.js",
62-
"types": "./dist/FastKit.d.ts"
63-
},
64-
"./auth": {
65-
"import": "./dist/packages/fastkit-auth/src/index.js",
66-
"require": "./dist/packages/fastkit-auth/src/index.js",
67-
"types": "./dist/packages/fastkit-auth/src/index.d.ts"
68-
},
69-
"./config": {
70-
"import": "./dist/packages/fastkit-config/src/index.js",
71-
"require": "./dist/packages/fastkit-config/src/index.js",
72-
"types": "./dist/packages/fastkit-config/src/index.d.ts"
73-
},
74-
"./db": {
75-
"import": "./dist/packages/fastkit-db-config/src/v1/index.js",
76-
"require": "./dist/packages/fastkit-db-config/src/v1/index.js",
77-
"types": "./dist/packages/fastkit-db-config/src/v1/index.d.ts"
78-
}
79-
},
8047
"dependencies": {
48+
"@types/figlet": "^1.7.0",
49+
"boxen": "^8.0.1",
50+
"chalk": "^5.4.1",
8151
"dotenv": "^16.4.5",
52+
"enquirer": "^2.4.1",
8253
"express": "^5.1.0",
54+
"figlet": "^1.8.2",
55+
"fs": "0.0.1-security",
56+
"listr2": "^9.0.1",
57+
"mongoose": "^8.16.3",
8358
"ts-node": "^10.9.2",
8459
"zod": "^3.23.8"
8560
},

0 commit comments

Comments
 (0)