Alfred-Emmanuel / Candidly_app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Candidly

An anonymous messaging platform built with NextJs, NodeJs, ExpressJS, MongoDB and AWS S3 for storing images with the server hosted on Render while the client is hosted on Vercel

The project is composed of two folders, candidly_backend (server) and candidly_frontend (client)

candidly_frontend

This is a multiple page Next.Js 13.5 app written with tailwind CSS that allows individuals to receive anonymous messages from wherever they share their links like whatsapp status, twitter e.t.c, it stores the multimedia files such as images in AWS S3 and stores the data in a MongoDB database including reference to the images stored in the S3 bucket.

Dependencies

  1. Create a .env file directly inside the candidly_frontend/my-app folder
  2. You need to understand how NEXT AUTH works.
  3. The needed variables inside the .env file are as follows:
    • PRODUCTION_ENDPOINT (This is the endpoint to your backend either hosted on a platform like render, heroku or locally (for development))
    • NEXTAUTH_URL (This is the url to your client (frontend) either hosted on a platform like vercel, netlify or locally (for development))
    • NEXTAUTH_SECRET (This can be any string of your choosing)

Running client Locally

  1. Be in candidly_frontend/my-app folder
  2. npm install To install dependencies
  3. npm run dev To start your development server

candidly_backend

This is a nodejs express web server that listens for calls which could originate from various parts of the application such as creating a new user, updating an existing user details, sending a new message, logging in e.t.c

Dependencies

  1. You need to have an account on AWS S3.
  2. You need to understand how JWT works.
  3. You need to have mongodb set up on your machine and understand how it works.
  4. Create a .env file directly inside candidly_backend folder
  5. The needed variables inside the .env file are as follows:
    • AWS_ACCESS_KEY_ID
    • AWS_BUCKET_NAME
    • AWS_REGION
    • AWS_SECRET_ACCESS_KEY
    • JWT_SECRET
    • MONGODB_URI
    • PRODUCTION_URL (url to your frontend)
    • EMAIL (any email address)
    • MAIL_PASSWORD (some email providers like gmail require you to generate an "app specific password")

Running Server Locally

  1. Make sure you are in the root folder Candidly_app/
  2. Run npm start

Happy coding!

About


Languages

Language:JavaScript 99.3%Language:CSS 0.7%