Skip to content

This is the API service for the snapfu web solution.

License

Notifications You must be signed in to change notification settings

litemikx/snapfu-web-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snapfu web api

The backend service partnered with snapfu web portal.

Requirements

  • NPM ^9.5.0
  • NodeJS version ^18.15.0
  • MongoDB version ^5

Database Schema

  • database name: snapfu (can be change)
  • collections:
    • accounts
    • connections
    • snaps

Installation

Application uses Gmail API to send the verification email for singup process, you can authorize or link your Google account by:

  1. In your terminal:
git clone https://github.com/litemikx/snapfu-web-api.git

cd snapfu-api

npm install
  1. Create following colletions in your MongoDB database:
  • accounts
  • connections
  • snaps

Note: See models folder for the collection structure.

Linking your Google Account

The app's signup process sends an email for the user to verify, this uses the GMAIL API.

  1. In your terminal:
node auth/mail/get_urls
  1. You'll get the authorization link. Open the link on a browser, a consent window will show up and link to your Google account. Get the "code" in the URL. Best to run the snapfu-web-portal.

  2. In your .env file, put the code there:

REACT_APP_AUTH_CODE=YOUR_CODE_HERE
  1. Once you start the server, it will create a file named gmail-credentials.json

Usage

Run in the terminal:

npm start

To see a demo or how this works, you can check my blog post tutorial here: How to Use: snapfu If you like this or want to support my side projects, like this one, you can:

Buy Me A Coffee

About

This is the API service for the snapfu web solution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published