Skip to content

Commit 3940f59

Browse files
INIT
0 parents  commit 3940f59

File tree

96 files changed

+29544
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+29544
-0
lines changed

.circleci/config.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
2+
version: 2.1
3+
4+
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
5+
# See: https://circleci.com/docs/2.0/orb-intro/
6+
orbs:
7+
node: circleci/[email protected]
8+
9+
# Invoke jobs via workflows
10+
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
11+
workflows:
12+
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
13+
# Inside the workflow, you define the jobs you want to run.
14+
jobs:
15+
- node/test:
16+
# This is the node version to use for the `cimg/node` tag
17+
# Relevant tags can be found on the CircleCI Developer Hub
18+
# https://circleci.com/developer/images/image/cimg/node
19+
version: '18.14.2'
20+
# If you are using yarn, change the line below from "npm" to "yarn"
21+
pkg-manager: npm

.dockerignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile
4+
.git
5+
.gitignore
6+
build
7+
README.md

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
insert_final_newline = true

.env.example

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
HOST=0.0.0.0
2+
PORT=3000
3+
SERVICE_NAME='your_service_name'
4+
5+
#JWT CONFIGURATION
6+
JWT_KEY='your_secret'
7+
SECRET='my_super_secret'
8+
HASH=10
9+
#JWT_PRIVATE_SECRET='jwt-private-secret'
10+
#JWT_PUBLIC_SECRET='jwt-public-secret'
11+
12+
#GOOGLE CLOUD CONFIGURATION
13+
#Go to GCP and create a service account and replace all the fields with yours in the json file
14+
GOOGLE_APPLICATION_CREDENTIALS='./src/config/gcloud/google-application-credentials.json'
15+
GOOGLE_PROJECT_ID='your_google_project_id'
16+
GOOGLE_STORAGE_BUCKET_NAME='your_google_storage_bucket_name'
17+
GOOGLE_CLIENT_ID='your_google_client_id'
18+
GOOGLE_CLIENT_SECRET='your_google_client_secret'
19+
GOOGLE_MAPS_API_KEY='your_google_maps_api_key'
20+
21+
#CLIENT CONFIGURATION
22+
CLIENT_URL='your_client_url_to_authorize'
23+
24+
#MONGO DB CONFIGURATION
25+
MONGO_URI='your_mongo_db_connection'
26+
MONGO_URI_TEST='your_mongo_db_connection_test'
27+
MONGO_USER='your_mongo_user'
28+
MONGO_PASS='your_mongo_password'
29+
30+
#MYSQL CONFIGURATION
31+
MYSQL_HOST_STAGE='your_myql_host_stage'
32+
MYSQL_USER_STAGE='your_myql_user'
33+
MYSQL_PASSWORD_STAGE='your_myql_pass'
34+
MYSQL_DB_STAGE='your_myql_db_name'
35+
MYSQL_SOCKET_STAGE='/your/socket-cloud-sql'
36+
37+
MYSQL_HOST_PROD='your_myql_host_stage'
38+
MYSQL_USER_PROD='your_myql_user'
39+
MYSQL_PASSWORD_PROD='your_myql_pass'
40+
MYSQL_DB_PROD='your_myql_db_name'
41+
MYSQL_SOCKET_PROD='/your/socket-cloud-sql'
42+
43+
44+
#SPARKPOST CONFIGURATION
45+
SPARKPOST_API_KEY='your_sparkpost_test_api_key'
46+
#SPARKPOST_API_KEY='your_sparkpost_live_api_key'
47+
SPARKPOST_SENDER_DOMAIN='your_sparkpost_sender_domain'
48+
49+
# MESSAGEBIRD CONFIGURATION
50+
MESSAGEBIRD_ACCESS_KEY='your_messagbird_access_key' #test key
51+
#MESSAGEBIRD_ACCESS_KEY='your_messagbird_access_key' #live key
52+
MESSAGEBIRD_WHATSAPP_CHANNEL_ID='your_messagebird_whatsapp_channel_id'
53+
MESSAGEBIRD_TEMPLATE_NAMESPACE_ID='your_messagebird_template_namespace_id'
54+
55+
#SENDGRID CONFIGURATION
56+
SENDGRID_API_KEY='your_sendgrid_api_key'
57+
SENDGRID_SENDER_EMAIL='your_sendgrid_email_sender'
58+
59+
#TWILIO CONFIGURATION
60+
TWILIO_ACCOUNT_SID='your_twilio_account_sid'
61+
TWILIO_AUTH_TOKEN='your_twilio_account_token'
62+
TWILIO_PHONE_NUMBER='+your_phone_number'
63+
64+
65+
#PUB/SUB TOPICS
66+
TOPIC_NAME='your_pubbus_topic_name'
67+
SUBSCRIPTION_NAME='your_pubsub_subscription_name'

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build/
2+
node_modules/
3+
docs/

.eslintrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./node_modules/gts/",
3+
"rules": {
4+
"no-process-exit": "off"
5+
}
6+
}

.gcloudignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gcloudignore
2+
.git
3+
.gitignore
4+
node_modules/
5+
#!include:.gitignore

.gitignore

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
133+
build
134+
docs
135+
docs/
136+
137+
138+
src/config/gcloud/google-web-client-secret.json
139+
src/config/gcloud/google-application-credentials.json
140+
target/

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
build
3+
dist

.prettierrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
...require('gts/.prettierrc.json')
3+
}

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Contributing to Project
2+
3+
All contributions are welcome!
4+
5+
For contributing to this project, please:
6+
* fork the repository to your own account
7+
* clone the repository
8+
* make changes
9+
* submit a pull request on `development` branch

Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:18-alpine as base
2+
3+
WORKDIR /usr/src/app
4+
EXPOSE 3000
5+
6+
FROM base as builder
7+
COPY ["package.json", "package-lock.json*", "./"]
8+
COPY ./tsconfig.json ./tsconfig.json
9+
COPY ./src ./src
10+
RUN npm ci --only-production
11+
RUN npm run compile
12+
RUN npm prune --production
13+
14+
FROM base as release
15+
ENV NODE_ENV=production
16+
USER node
17+
COPY --chown=node:node --from=builder /usr/src/app/node_modules ./node_modules
18+
COPY --chown=node:node --from=builder /usr/src/app/build ./build
19+
COPY --chown=node:node . /usr/src/app
20+
CMD ["node", "./build/src/bin/server"]

0 commit comments

Comments
 (0)