βββ src/
β βββ auth/
β β βββ auth.controller.ts
β β βββ auth.module.ts
β β βββ auth.service.ts
β β βββ jwt.strategy.ts
β β βββ dto/
β β β βββ login.dto.ts
β β β βββ register-tenant.dto.ts
π―
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import re | |
from typing import Dict, List, Any | |
from crewai import Agent, Crew, Task, Process | |
from langchain_openai import OpenAI | |
from copilotkit import CopilotKitState | |
class FeedbackAnalyzerState(CopilotKitState): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Column } from 'typeorm'; | |
export class TenantAwareEntity { | |
@Column() | |
tenantId: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller, Get } from '@nestjs/common'; | |
import { DataSource } from 'typeorm'; | |
import { InjectDataSource } from '@nestjs/typeorm'; | |
@Controller() | |
export class AppController { | |
constructor( | |
@InjectDataSource() private dataSource: DataSource, | |
) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller, Post, Get, Param, Body } from '@nestjs/common'; | |
import { OrderService } from './order.service'; | |
import { CreateOrderDto } from './order.dto'; | |
import { CurrentTenant } from '../tenants/tenant.decorator'; | |
import { Tenant } from '../tenants/tenant.entity'; | |
@Controller('orders') | |
export class OrderController { | |
constructor(private readonly orderService: OrderService) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Controller, | |
Get, | |
Post, | |
Body, | |
Param, | |
Delete, | |
UseGuards, | |
} from '@nestjs/common'; | |
import { ProductService } from './product.service'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IsEmail, IsString } from 'class-validator'; | |
export class CreateUserDto { | |
@IsEmail() | |
email: string; | |
@IsString() | |
firstName: string; | |
@IsString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller, Post, Body } from '@nestjs/common'; | |
import { AuthService } from './auth.service'; | |
import { LoginDto } from './dto/login.dto'; | |
import { RegisterTenantDto } from './dto/register-tenant.dto'; | |
@Controller('auth') | |
export class AuthController { | |
constructor(private readonly authService: AuthService) {} | |
@Post('register-tenant') |
NewerOlder