Skip to content

Commit

Permalink
Add license
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljonescodes committed Mar 20, 2024
1 parent 43e4cbe commit 16d32ae
Show file tree
Hide file tree
Showing 214 changed files with 4,614 additions and 72 deletions.
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

196 changes: 124 additions & 72 deletions env-example
Original file line number Diff line number Diff line change
@@ -1,94 +1,146 @@
NODE_ENV=development
PORT=4000
APP_NAME="NestJS API"
API_PREFIX=api
#
# App
#

APP_NAME="MyOrderApp"
[email protected]
APP_FALLBACK_LANGUAGE=en
APP_HEADER_LANGUAGE=x-custom-lang
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://localhost:4000
CORS_ORIGIN_REG_EXP=(localhost)
APP_FRONTEND_URL=http://localhost:3000
APP_BACKEND_URL=http://localhost:4000
APP_CORS_ORIGIN_REG_EXP=(localhost)
APP_HEADER_API_KEY=Api-Key
APP_API_KEYS=1,2

#
# Administrators
#

ADMIN_FIRST_NAME=Super
ADMIN_LAST_NAME=User
[email protected]
ADMIN_PASSWORD=123456

DATABASE_TYPE=postgres
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_USERNAME=root
DATABASE_PASSWORD=secret
DATABASE_NAME=api
DATABASE_SYNCHRONIZE=true
DATABASE_MAX_CONNECTIONS=100
DATABASE_SSL_ENABLED=false
DATABASE_REJECT_UNAUTHORIZED=false
DATABASE_CA=
DATABASE_KEY=
DATABASE_CERT=
DATABASE_LOGGING=true
#
# AWS S3
#

# Support "local", "s3"
FILE_DRIVER=local
ACCESS_KEY_ID=
SECRET_ACCESS_KEY=
AWS_S3_ACCESS_KEY_ID=
AWS_S3_SECRET_ACCESS_KEY=
AWS_S3_REGION=
AWS_DEFAULT_S3_BUCKET=

MAIL_DEFAULTS_FROM='"MyOrderApp" <[email protected]>'
MAIL_AUTH_API_KEY=123
MAIL_AUTH_DOMAIN=noreply.example.dev

AUTH_JWT_SECRET=secret
AUTH_JWT_TOKEN_EXPIRES_IN=15m
AUTH_REFRESH_SECRET=secret_for_refresh
AUTH_REFRESH_TOKEN_EXPIRES_IN=3650d

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

APPLE_APP_AUDIENCE=[]
AWS_S3_DEFAULT_BUCKET=

TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
#
# Mailer
#

WORKER_HOST=redis://redis:6379/1
MAILER_DEFAULTS_FROM=
MAILER_AUTH_API_KEY=
MAILER_AUTH_DOMAIN=

TWILIO_ACCOUNT_SID=AC_
TWILIO_AUTH_TOKEN=a
TWILIO_FROM_PHONE=a
#
# Twilio
#

STRIPE_API_KEY=sk_test_a
STRIPE_WEBHOOK_SECRET=whsec_123
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=

STRIPE_PRICE_ID_PRO_USD=price_123
STRIPE_PRICE_ID_PRO_EUR=price_123
STRIPE_PRICE_ID_PRO_GBP=price_123
STRIPE_PRICE_ID_PRO_JPY=price_123
STRIPE_PRICE_ID_PRO_CAD=price_123
STRIPE_PRICE_ID_PRO_AUD=price_123
#
# Authentication
#

STRIPE_PRICE_ID_FREE_USD=price_123
STRIPE_PRICE_ID_FREE_EUR=price_123
STRIPE_PRICE_ID_FREE_GBP=price_123
STRIPE_PRICE_ID_FREE_JPY=price_123
STRIPE_PRICE_ID_FREE_CAD=price_123
STRIPE_PRICE_ID_FREE_AUD=price_123
AUTH_API_KEYS=1,2
AUTH_JWT_SECRET=secret
AUTH_JWT_TOKEN_EXPIRES_IN=60m
AUTH_REFRESH_SECRET=secret_for_refresh
AUTH_REFRESH_TOKEN_EXPIRES_IN=7d

SQUARE_WEBHOOK_SIGNATURE_KEY=123
SQUARE_OAUTH_CLIENT_ID=sandbox-123
SQUARE_OAUTH_CLIENT_SECRET=sandbox-sq0csb-123
SQUARE_CLIENT_ENVIRONMENT=sandbox
SQUARE_BASE_URL=https://connect.squareupsandbox.com
#
# Google
#

SQUARE_TEST_CODE=moa_square_test_code
SQUARE_TEST_ACCESS_TOKEN=123
SQUARE_TEST_REFRESH_TOKEN=123
SQUARE_TEST_EXPIRE_AT=2023-09-26 18:10:29
SQUARE_TEST_ID=123
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

SENTRY_DSN=123
#
# Apple
#

APPLE_APP_AUDIENCE=[]

#
# Stripe
#

STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=

#
# Square
#

SQUARE_ENCRYPTION_TOKEN=
SQUARE_OAUTH_CLIENT_ID=
SQUARE_OAUTH_CLIENT_SECRET=
SQUARE_CLIENT_ENVIRONMENT=
SQUARE_WEBHOOK_SIGNATURE_KEY=

#
# MoaSquare
#

SQUARE_TIER_0_APP_FEE_BIG_INT_NUMERATOR=500
SQUARE_TIER_1_APP_FEE_BIG_INT_NUMERATOR=250
SQUARE_TIER_2_APP_FEE_BIG_INT_NUMERATOR=0
SQUARE_TIER_APP_FEE_BIG_INT_DENOMINATOR=10000

STRIPE_PRICE_ID_TIER_2_USD=
STRIPE_PRICE_ID_TIER_2_EUR=
STRIPE_PRICE_ID_TIER_2_GBP=
STRIPE_PRICE_ID_TIER_2_JPY=
STRIPE_PRICE_ID_TIER_2_CAD=
STRIPE_PRICE_ID_TIER_2_AUD=

STRIPE_PRICE_ID_TIER_1_USD=
STRIPE_PRICE_ID_TIER_1_EUR=
STRIPE_PRICE_ID_TIER_1_GBP=
STRIPE_PRICE_ID_TIER_1_JPY=
STRIPE_PRICE_ID_TIER_1_CAD=
STRIPE_PRICE_ID_TIER_1_AUD=

STRIPE_PRICE_ID_TIER_0_USD=
STRIPE_PRICE_ID_TIER_0_EUR=
STRIPE_PRICE_ID_TIER_0_GBP=
STRIPE_PRICE_ID_TIER_0_JPY=
STRIPE_PRICE_ID_TIER_0_CAD=
STRIPE_PRICE_ID_TIER_0_AUD=

#
# Square Test
#

SQUARE_TEST_CODE=
SQUARE_TEST_ACCESS_TOKEN=
SQUARE_TEST_REFRESH_TOKEN=
SQUARE_TEST_EXPIRE_AT=
SQUARE_TEST_ID=
SQUARE_TEST_USE_S3=

#
# Database
#

DATABASE_TYPE=
DATABASE_HOST=
DATABASE_PORT=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_SYNCHRONIZE=
DATABASE_MAX_CONNECTIONS=
DATABASE_SSL_ENABLED=
DATABASE_REJECT_UNAUTHORIZED=
DATABASE_CA=
DATABASE_KEY=
DATABASE_CERT=
DATABASE_LOGGING=
18 changes: 18 additions & 0 deletions src/admin/admin.controller.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import {
BadRequestException,
Body,
Expand Down
18 changes: 18 additions & 0 deletions src/admin/admin.module.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import { Module } from '@nestjs/common';
import { AdminController } from '../admin/admin.controller.js';
import { AuthenticationModule } from '../authentication/authentication.module.js';
Expand Down
18 changes: 18 additions & 0 deletions src/admin/administrators.guard.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import {
CanActivate,
ExecutionContext,
Expand Down
18 changes: 18 additions & 0 deletions src/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import { AppConfigType } from './configs/app.config';
import { AwsS3ConfigType } from './configs/aws-s3.config';
import { MailerConfigType } from './configs/mailer.config';
Expand Down
18 changes: 18 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import { MailerModule } from '@nestjs-modules/mailer';
import { HandlebarsAdapter } from '@nestjs-modules/mailer/dist/adapters/handlebars.adapter.js';
import { Module } from '@nestjs/common';
Expand Down
18 changes: 18 additions & 0 deletions src/auth-apple/auth-apple.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import { registerAs } from '@nestjs/config';
import { plainToClass } from 'class-transformer';
import { IsJSON, IsOptional, validateSync } from 'class-validator';
Expand Down
18 changes: 18 additions & 0 deletions src/auth-apple/auth-apple.controller.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import {
Body,
Controller,
Expand Down
18 changes: 18 additions & 0 deletions src/auth-apple/auth-apple.module.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
This code is part of myorderapp-backend, a multi-tenant Square-based CMS.
Copyright (C) 2024 Adeptry, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
*/

import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { AuthenticationModule } from '../authentication/authentication.module.js';
Expand Down
Loading

0 comments on commit 16d32ae

Please sign in to comment.