stackkit 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/cli/add.d.ts +2 -1
- package/dist/cli/add.js +318 -110
- package/dist/cli/create.js +8 -45
- package/dist/cli/doctor.js +0 -10
- package/dist/cli/list.js +3 -5
- package/dist/index.js +23 -4
- package/dist/lib/conversion/js-conversion.js +3 -2
- package/dist/lib/discovery/module-discovery.d.ts +0 -1
- package/dist/lib/discovery/module-discovery.js +27 -5
- package/dist/lib/generation/code-generator.d.ts +14 -0
- package/dist/lib/generation/code-generator.js +69 -65
- package/dist/lib/generation/generator-utils.d.ts +11 -0
- package/dist/lib/generation/generator-utils.js +116 -0
- package/dist/lib/git-utils.js +20 -0
- package/dist/lib/project/detect.js +2 -4
- package/dist/lib/utils/package-root.d.ts +1 -0
- package/dist/lib/utils/package-root.js +45 -0
- package/dist/types/index.d.ts +0 -10
- package/modules/auth/authjs/generator.json +10 -0
- package/modules/auth/authjs/module.json +0 -9
- package/modules/auth/better-auth/files/lib/auth.ts +7 -7
- package/modules/auth/better-auth/generator.json +12 -12
- package/modules/auth/better-auth/module.json +0 -24
- package/modules/database/mongoose/files/models/health.ts +34 -0
- package/modules/database/mongoose/generator.json +4 -4
- package/modules/database/mongoose/module.json +1 -2
- package/modules/database/prisma/files/lib/prisma.ts +2 -1
- package/modules/database/prisma/generator.json +33 -8
- package/modules/database/prisma/module.json +1 -4
- package/package.json +1 -2
- package/templates/express/tsconfig.json +2 -23
- package/dist/lib/database/database-config.d.ts +0 -6
- package/dist/lib/database/database-config.js +0 -9
- package/modules/database/mongoose/files/models/User.ts +0 -34
- package/templates/react-vite/README.md +0 -56
- /package/modules/database/mongoose/files/lib/{db.ts → mongoose.ts} +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface IUser extends Document {
|
|
4
|
-
name: string;
|
|
5
|
-
email: string;
|
|
6
|
-
createdAt: Date;
|
|
7
|
-
updatedAt: Date;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const UserSchema: Schema = new Schema(
|
|
11
|
-
{
|
|
12
|
-
name: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
trim: true,
|
|
16
|
-
},
|
|
17
|
-
email: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true,
|
|
20
|
-
unique: true,
|
|
21
|
-
lowercase: true,
|
|
22
|
-
trim: true,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
timestamps: true,
|
|
27
|
-
},
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
// Add indexes for better performance
|
|
31
|
-
UserSchema.index({ email: 1 });
|
|
32
|
-
UserSchema.index({ createdAt: -1 });
|
|
33
|
-
|
|
34
|
-
export default mongoose.models.User || mongoose.model<IUser>("User", UserSchema);
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# React Template
|
|
2
|
-
|
|
3
|
-
Production-ready React starter with TypeScript, Vite, and essential libraries.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm install
|
|
9
|
-
pnpm dev
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Features
|
|
13
|
-
|
|
14
|
-
- React 19 with TypeScript
|
|
15
|
-
- Vite for fast development
|
|
16
|
-
- React Router for routing
|
|
17
|
-
- TanStack Query for data fetching
|
|
18
|
-
- Tailwind CSS for styling
|
|
19
|
-
- ESLint for code quality
|
|
20
|
-
|
|
21
|
-
## Scripts
|
|
22
|
-
|
|
23
|
-
- `pnpm dev` - Start development server
|
|
24
|
-
- `pnpm build` - Build for production
|
|
25
|
-
- `pnpm preview` - Preview production build
|
|
26
|
-
- `pnpm lint` - Run linter
|
|
27
|
-
|
|
28
|
-
## Environment Variables
|
|
29
|
-
|
|
30
|
-
Copy `.env.example` to `.env` and configure:
|
|
31
|
-
|
|
32
|
-
```env
|
|
33
|
-
VITE_API_URL=http://localhost:3000/api
|
|
34
|
-
VITE_APP_NAME=My App
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Project Structure
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
src/
|
|
41
|
-
├── api/ # API client
|
|
42
|
-
├── components/ # UI components
|
|
43
|
-
├── hooks/ # Custom hooks
|
|
44
|
-
├── lib/ # Utilities
|
|
45
|
-
├── pages/ # Route pages
|
|
46
|
-
├── types/ # TypeScript types
|
|
47
|
-
└── utils/ # Helper functions
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Deployment
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
pnpm build
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Deploy the `dist` folder to Vercel, Netlify, or any static hosting service.
|
|
File without changes
|