diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4463397 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +tests +Dockerfile +.git \ No newline at end of file diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..07135ca --- /dev/null +++ b/.env.sample @@ -0,0 +1,6 @@ +CONNECTION_STRING=[YOUR MONGODB CONNECTION STRING] +ACCESS_TOKEN_SECRET=[JWT SECRET ] +PORT=[YOUR PORT NUMBER use 4000] +SALT_ROUNDS=[SALT ROUNDS AN INTEGER] +NANOID_SIZE=[NANOID SIZE AS INTEGER] +BASE_URL=[YOUR BASE URL] \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b4c7596..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -# These are supported funding model platforms -buy_me_a_coffee: dipeshmalvia diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..d122589 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + # 18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + #- run: npm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f21726c --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local +.env + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd175e8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:lts-alpine +WORKDIR /app +COPY package*.json /app +RUN npm install +COPY . /app +EXPOSE 4000 +CMD npm run dev \ No newline at end of file diff --git a/README.md b/README.md index 123a4ab..48e8ca4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,203 @@ -# Express_MongoDB_Rest_API_Tutorial -This is express & mongodb rest api tutorial for contact management app + +# **System Design Document (SDD)** +## **Contact Management App** +**Version:** 1.1 +**Date:** January 22, 2025 + +--- + +## Description +This is a Backend Application (Express + Node + Mongoose) which stores user information and contacts. + + +## Authors + +- [@jadogeri](https://www.github.com/jadogeri) + +## Screenshots + +| ![Screenshot 1](assets/images/screenshot1.png) | ![screenshot 2](assets/images/screenshot2.png) | +| --------------------------------------- | --------------------------------------- | +| | | + ![Screenshot 1](assets/images/screenshot3.png) | ![screenshot 2](assets/images/screenshot4.png) | +| --------------------------------------- | --------------------------------------- | +| | | +## Table of Contents + + + + + + + + + +