Skip to content

Dev-Ninjas-Backup/yousef-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

615 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📖 Documentation Links

📦 Installation

# Install dependencies
npm install.,

# Set up environment variables
cp .env.example .env

# Run database migrations
npx prisma migrate dev

# Start the server
npm run start:dev

👥 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

How to use it

  1. Create/replace package.json in the root of your project with the JSON above.
  2. Run:
npm install
  1. Follow the Getting Started steps from your README (.env, prisma migrate dev, npm run start:dev, etc.).

Updated README (Markdown)

# yousef-server Project

A production-ready NestJS template with Prisma ORM, Docker support, JWT authentication, and modular structure.

## Features

- Prisma ORM integration
- JWT authentication
- Docker support
- Modular architecture
- Swagger API docs
- Firebase integration (optional)
- File upload handling
- Environment configuration
- Test setup
- Socket.io

## Project Structure

src/ ├── main/ # Core business modules │ ├── recommendation/ # Example module │ └── ... ├── common/ # Shared utilities, guards ├── lib/ # External integrations ├── prisma/ # Database schema & seeds ├── uploads/ # File uploads └── main.ts # App bootstrap


## Prerequisites

- Node.js **v18+**
- PostgreSQL
- Docker *(optional)*
- Ngrok *(optional)*

## Getting Started

1. **Clone & Install**

```bash
git clone https://github.com/Joy43/NestJS-template
cd NestJS-template
npm install
  1. Configure Environment
    Create a .env file in the root:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/nest_template"
JWT_SECRET="your_jwt_secret"
JWT_EXPIRATION="7d"
PORT=5000
NODE_ENV=development
  1. Database Setup
npx prisma generate
npx prisma migrate dev
  1. Run Development Server
npm run start:dev

Development Scripts

Script Description
start:dev Hot-reload development server
build Compile to dist/ for production
start:prod Run compiled production app
lint / lint:fix ESLint check / auto-fix
format / format:fix Prettier check / auto-format
test Unit tests (jest)
test:e2e End-to-end tests
ci:check Full CI validation (format → lint → build)
ci:fix Auto-fix format & lint issues

Prisma Commands

npx prisma generate        # Generate client
npx prisma migrate dev     # Create & apply migration (dev)
npx prisma migrate deploy  # Apply migrations in production
npx prisma studio          # GUI for DB
npx prisma db push         # Sync schema without migrations

Docker

docker compose up --build   # Start PostgreSQL + app
docker compose down         # Stop containers

API Documentation

Swagger UI: /docs

Authentication

Authorization: Bearer <jwt-token>

Generating Modules

npx nest g resource main/<module-name>

Resources

Install a simple Markdown viewer:

bash npm install -g live-server markdown-it-cli Then run in your project folder:

Preview any .md file (e.g. README.md)

npx markdown-it README.md -o README.html && live-server README.html

License

Made with ❤️ by Team Dev Ninja


---

**Copy the `package.json` snippet** into your project, run `npm install`, and you’ll have a fully functional NestJS + Prisma starter that matches the README you shared. Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors