add server file descriptions to template

pull/1104/merge
LeonOstrez 2 years ago
parent 89c32f45b4
commit 3f4e7cbff9

@ -5,12 +5,12 @@ class ViteReactProjectTemplate(BaseProjectTemplate):
stack = "backend"
name = "vite_react"
path = "vite_react"
description = "Vite + React + Tailwind CSS + TypeScript + Shadcn"
description = "Vite + React + Tailwind CSS + TypeScript + Shadcn + Nodejs + Mongo"
file_descriptions = {
"client/components.json": "Configuration file for UI component library, defining schema, styling options, and resource paths.",
"client/eslint.config.js": "ESLint configuration file for TypeScript and React, including plugins and custom rules.",
"client/index.html": "Main HTML entry point with root div for React mounting and main.tsx script.",
"client/package.json": "Project configuration with dependencies, scripts, and metadata.",
"client/package.json": "Client configuration with dependencies, scripts, and metadata.",
"client/postcss.config.js": "PostCSS configuration with tailwindcss and autoprefixer plugins.",
"client/src/App.css": "Main application styles including root layout and animations.",
"client/src/App.tsx": "Main React component with layout structure and welcome message.",
@ -75,6 +75,13 @@ class ViteReactProjectTemplate(BaseProjectTemplate):
"client/tsconfig.json": "Main TypeScript configuration with project references.",
"client/tsconfig.node.json": "TypeScript configuration for Node.js environment.",
"client/vite.config.ts": "Vite build tool configuration with React plugin and aliases.",
"server/.env": "This file is a configuration file in the form of a .env file. It contains environment variables used by the application, such as the port to listen on, the MongoDB database URL, and the session secret string.",
"server/server.js": "This `server.js` file sets up an Express server with MongoDB database connection, session management using connect-mongo, templating engine EJS, static file serving, authentication routes, error handling, and request logging. [References: dotenv, mongoose, express, express-session, connect-mongo, ./routes/authRoutes]",
"server/package.json": "Server configuration with dependencies, scripts, and metadata. [References: server.js]",
"server/routes/authRoutes.js": "This file defines routes for user authentication including registration, login, and logout. It interacts with a User model to handle user data and uses bcrypt for password hashing and comparison. [References: models/User.js]",
"server/routes/middleware/authMiddleware.js": "This file defines a middleware function called isAuthenticated, which checks if a user is authenticated based on the presence of a userId in the session object. If authenticated, it allows the request to proceed to the next middleware or route handler; otherwise, it returns a 401 status response indicating the user is not authenticated.",
"server/models/User.js": "This file defines a Mongoose model for a user with fields for username and password. It includes a pre-save hook to hash the user's password before saving it to the database using bcrypt. [References: mongoose, bcrypt]",
"package.json": "Project configuration with dependencies, scripts, and metadata.",
}
summary = "\n".join([])
options_class = NoOptions

Loading…
Cancel
Save