Skip to content

A full stack social network app built with React, NodeJS and MongoDB.

License

Notifications You must be signed in to change notification settings

mateusmtoledo/fancybook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A social network app built with React, NodeJS and MongoDB.

Features

  • Authentication: Local and Google OAuth 2.0 using PassportJS
  • Publish posts that other users can interact with by liking and commenting
  • Add friends to see their posts in your home page
  • Customizable user profile page

Setup

  1. Clone this repository.

  2. Open a terminal and navigate into the root directory of your local repository.

  3. Install dependencies:

     npm install
    
  4. Create a MongoDB database. See Get started with MongoDB Atlas.

  5. Create a .env file in the backend directory and add a MONGODB_URL variable with your MongoDB connection string:

     echo "MONGODB_URL=<Your mongodb connection string>" > backend/.env
    

    Note: at this point the app is ready to be launched. If you do not need any of the features below, skip to step 8.

  6. Set up Google OAuth:

    • Register your app in the Google Cloud platform. Check Setting up OAuth 2.0.

    • Add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET environment variables to the backend .env file:

       GOOGLE_CLIENT_ID=<Your google client ID>
       GOOGLE_CLIENT_SECRET=<Your google client secret>
      
  7. Enable user image upload:

    • Create a free cloudinary account.

    • Navigate to the cloudinary dashboard.

    • Copy the cloudinary environment variable into the backend .env file:

       CLOUDINARY_URL=<Your cloudinary URL>
      
  8. Start the app:

     npm start
    

    Client will be available at localhost:3000.

Tests

This app features unit and integration tests with jest and testing-library.

The test runner can be launched in the root directory by running:

npm test

About

A full stack social network app built with React, NodeJS and MongoDB.

Topics

Resources

License

Stars

Watchers

Forks

Languages