/msg

MSG app

Primary LanguageTypeScriptMIT LicenseMIT

MESSANGER

Nest Logo

1. Setup .env

  • create .env file of the server directory
MAILER_USER=
MAILER_HOST=
MAILER_PORT=
MAILER_PASS=

MYSQL_HOST=
MYSQL_LOCAL_PORT=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=

MYSQL_ROOT_PASSWORD=
MYSQL_DOCKER_PORT=

NESTJS_APP_LOCAL_PORT=
NESTJS_APP_DOCKER_PORT=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CALL_BACK_URL=

CLIENT_ORIGIN=
CLIENT_TO_LOGIN=
CLIENT_TO_REGISTRATE=
CLIENT_TO_PROFILE=

REDIS_HOST=
REDIS_LOCAL_PORT=
  • create .env file of the client directory
NEXTJS_APP_LOCAL_PORT=
NEXTJS_APP_DOCKER_PORT=


NEXT_PUBLIC_SECURE_LOCAL_STORAGE_HASH_KEY=
NEXT_PUBLIC_SECURE_LOCAL_STORAGE_PREFIX=


NEST_PUBLIC_SERVER_BASE=

NEST_PUBLIC_SERVER_BASIC_REG=
NEST_PUBLIC_SERVER_BASIC_REG_CONFIRM=
NEST_PUBLIC_SERVER_BASIC_REG_RESEND=

NEST_PUBLIC_SERVER_BASIC_AUTH=
NEST_PUBLIC_SERVER_GOOGLE_AUTH=

NEST_PUBLIC_SERVER_PROFILE=


NEXT_PUBLIC_CLIENT_REG=
NEXT_PUBLIC_CLIENT_CONFIRMATION=
NEXT_PUBLIC_CLIENT_PROFILE=

2. Up with docker-compose

Pull images and up containers

docker-compose --env-file ./server/.env ./client/.env up --build

3. Server tree

src
├── app.module.ts
├── auth
│   ├── auth-strategies
│   │   ├── auth.strategy.ts
│   │   ├── google.auth.strategy.ts
│   │   └── local.auth.strategy.ts
│   ├── auth.controller.ts
│   ├── auth.module.ts
│   ├── auth.service.ts
│   ├── dto
│   │   ├── access.token.dto.ts
│   │   ├── login.user.dto.ts
│   │   └── payload.dto.ts
│   ├── guards
│   │   ├── google.oauth.guard.ts
│   │   ├── jwt.auth.guard.ts
│   │   └── local.auth.guard.ts
│   └── passport-strategies
│       ├── google.strategy.ts
│       ├── jwt.strategy.ts
│       └── local.strategy.ts
├── email-confirmation
│   ├── dto
│   │   ├── email.confirmation.dto.ts
│   │   └── resend.code.dto.ts
│   ├── email.confirmation.controller.ts
│   ├── email.confirmation.module.ts
│   ├── email.confirmation.service.ts
│   └── guards
│       └── confirmation.email.guard.ts
├── mail
│   ├── dto
│   │   └── send.mail.dto.ts
│   ├── mail.module.ts
│   └── mail.service.ts
├── main.ts
├── profile
│   ├── dto
│   │   ├── jwt.payload.dto.ts
│   │   └── user.profile.dto.ts
│   ├── profile.controller.ts
│   ├── profile.module.ts
│   └── profile.service.ts
├── redis
│   ├── redis.module.ts
│   └── redis.service.ts
├── registration
│   ├── dto
│   │   └── create.user.dto.ts
│   ├── guards
│   │   └── validate.new.user.guard.ts
│   ├── registration.controller.ts
│   ├── registration.module.ts
│   └── registration.service.ts
├── repositories
│   └── users
│       ├── users.module.ts
│       └── users.service.ts
└── utils
    ├── config
    │   ├── mailer.config.ts
    │   └── typeorm.config.ts
    ├── constants
    │   └── constants.ts
    ├── decorators
    │   └── parse.request.decorator.ts
    ├── entities
    │   └── user.entity.ts
    └── migrations
        └── 1722589444444-User.ts

4. Client tree

app
├── components
│   └── form
│       └── index.tsx
├── favicon.ico
├── global.css
├── layout.tsx
├── not-found.tsx
├── page.tsx
├── profile
│   ├── components
│   ├── page.tsx
│   └── utils
│       ├── interfaces
│       │   └── index.ts
│       └── services
│           └── index.ts
├── registration
│   ├── components
│   │   └── form
│   │       └── index.tsx
│   ├── confirmation
│   │   ├── components
│   │   │   └── form
│   │   │       └── index.tsx
│   │   ├── page.tsx
│   │   └── utils
│   │       ├── interfaces
│   │       │   └── index.ts
│   │       └── services
│   │           └── index.ts
│   ├── page.tsx
│   └── utils
│       ├── interfaces
│       │   └── index.ts
│       └── services
│           └── index.ts
└── utils
    ├── interfaces
    │   └── index.ts
    └── services
        └── index.ts

5. Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

6. Stay in touch

7. License

Nest is MIT licensed.