Giter Site home page Giter Site logo

l-lawliet07 / anime.io Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 23.22 MB

πŸ’» A is a social networking web application in which you can find, follow, and communicate with other people.

Home Page: https://anime-io.herokuapp.com/

JavaScript 81.67% CSS 5.73% HTML 12.60%
chat real-time social-network nodejs expressjs mongodb mongodb-atlas jwt anime

anime.io's Introduction

Anime.io is a social networking website where you can make friends and communicate with them.

Live

Anime.io

Features

  • 🦾 Uses Express as the application Framework.
  • πŸ—£ Real-time communication between client and server using Socket.io.
    • πŸ‘₯ Real-time Private Communication.
    • πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘¦ Real-time Group Communication.
    • ⏱ Real-time Notification.
  • πŸ“œ Uses MongoDB, Mongoose and MongoDB Atlas for storing and querying data.
  • πŸ”­ Can Search people and follow them.
  • πŸ“° Uses ejs(Embedded JavaScript) as templating language view engine.
  • πŸ”’ JWT is used for Authentication.
  • πŸ” Passwords are hashed using bcrypt-nodejs package.
  • ✏️ Uses dotenv to Load environment variables from .env file.

Tools & Technology

  • Nodejs : JavaScript runtime environment that executes JavaScript code outside a web browser.
  • Express : Uses Express as the application Framework.
  • Socket.io : Real-time communication between a client and a server using Socket.io.
  • MongoDB : MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program.
  • JWT : JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed
  • Html & CSS : Html and CSS is used for frontend design.

Installation

Run locally

  1. Clone or Download the repository
    $ git clone
    $ cd Anime.io
  1. Install Dependencies
    $ npm install
  1. Create Config file(./config.env) and fill all environment variables.
NODE_ENV=development    // Node environment production/development
PORT=8000    // Port to run server
USER=L-lawliet07    // Username
DB_USERNAME=lawliet07    // mongo atlas username
DB_PASSWORD=<Password>    // mongo atlas password
DB=<CONNECTION STRING>    // mongo atlas connection string
DB_LOCAL=<LOCAL CONNECTION STRING>     // local connection string
JWT_SECRET=this-is-32-character-long-secret
JWT_EXPIRES_IN=90d // JWT valid duration
JWT_COOKIE_EXPIRES_IN=90 
EMAIL_USERNAME=<USERNAME>
EMAIL_PASSWORD=<PASSWORD>
EMAIL_HOST=<HOST>
EMAIL_PORT=<PORT>

  1. Run Parcel to bundle multiple javascript files to single file.
    $ npm run watch:js
    $ npm run bundle:js
  1. Start the application
    $ npm start

Your app should now be running on localhost:8000

Deploying to Heroku

Make sure you have heroku installed on your machine and have heroku account.

  1. Login to heroku on your machine.
$ heroku login
  1. Now create a new app.
$ heroku create
  1. Now push your code to heroku.
$ git push heroku master
  1. Set environment variable on heroku.

    • Using Command line.
        $ heroku config:set <NAME>=<VALUE>
    
    • Using Heroku Website

      1. Go to Settings -> Reveal Config Vars.
      2. Now add Environment variable.
  2. Now run

$ heroku open

Setup Configurations

Nodejs

Make sure you have node and npm installed on your machine.

  1. Install all the dependenceis using npm install command.
  2. Now Go to ./config.env and fill.
    NODE_ENV=development    // Node environment production/development
    PORT=8000    // Port to run server
    USER=<USERNAME>    // Username

MongoDB

Running Locally

Make sure you have mongodb installed on your machine.

  1. Run Mongo deamon on your computer.
    $ mongod
By default mongod will run on port 27017.
    $ mongod --port <PORT>
MongoDB will run on port .
  1. Now Go to ./config.env and fill.
    DB_LOCAL=mongodb://localhost:<PORT>/animeio
Here animeio is db name.

Using MongoDB Atlas

Make sure you have a mongodb account.

  1. login to mongodb.com.
  2. Go to new project and enter project name.
  3. Click build cluster.
  4. Now goto connect and click allow access from anywhere.
  5. Now choose connection method(connect your application).
  6. Copy the connection string and fill config.env.
   DB_USERNAME=<Username>    // mongo atlas username
   DB_PASSWORD=<Password>    // mongo atlas password
   DB=<Connection String>    // mongo atlas connection string

JWT

Go to ./config.env and fill.

   JWT_SECRET=this-is-32-character-long-secret // jwt secret to sign token
   JWT_EXPIRES_IN=90d // jwt token valid duration (90days)
   JWT_COOKIE_EXPIRES_IN=90 // jwt cookie valid duration (90days)

EMAIL

  • To send email we have used Nodemailer. Nodemailer is a module for Node.js applications to allow easy as cake email sending.

  • We have also used Mailtrap for fake smtp server for testing(You can user gmail services).

    Make sure you have mailtrap account.

    1. Login to mailtrap.io.
    2. Go to new project and enter inbox name.
    3. Then goto smtp setting copy the credentials and paste it to ./config.env.
        EMAIL_USERNAME=<USERNAME>
        EMAIL_PASSWORD=<PASSWORD>
        EMAIL_HOST= <HOST>
        EMAIL_PORT=<PORT>
    

Support

If you find it useful, please give it a star⭐️ and fork it🀭.


< C'mon Fork it ✊🏼 />

anime.io's People

Contributors

l-lawliet07 avatar

Stargazers

Reaper avatar Amber Gautam avatar Divakar Chakravorty avatar Divakar Chakravorty avatar Swaraj Deep avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.