Skip to content

RED0731/red_pinterestClone

Repository files navigation

Pinterest-Clone

codecov

A clone of the Pinterest application for educational purposes

https://pinterest-clone-oct6.onrender.com/

Use the app to generate images using a web link, upload your own images, or use OpenAI’s cutting-edge image generation technology.

Screenshot (45)

Getting Started

A) Local

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Prerequisite Version
Node.js / npm (comes with Node) ~ ^18.3.0 / ~^8.19.3
Git ~ ^2
Docker Desktop (optional) ~ ^4.4.2

Installing

Create a new directory and initialize git

mkdir Pinterest-Clone
cd Pinterest-Clone
git init

Pull from github and install packages

git pull https://github.com/Dereje1/Pinterest-Clone.git

npm install

To run mongoDB locally with docker :

In the root folder run

docker-compose up mongodb

Alternatively, you can get a connection string from mongodb Atlas after setting up your own db.

create .env files

In the root of the project create a .env file with the following contents


SESSION_SECRET=<Secret for Express Session>
MONGOLAB_URI=mongodb://root:123456@localhost:27017
TWITTER_CONSUMER_KEY=< Get from Twitter Developer API >
TWITTER_CONSUMER_SECRET=< Get from Twitter Developer API >
TWITTER_CALLBACK=http://localhost:8080/auth/twitter/redirect
GOOGLE_CLIENT_ID=< Get from Google Developer API >
GOOGLE_CLIENT_SECRET=< Get from Google Developer API >
GOOGLE_CALLBACK=http://localhost:8080/auth/google/redirect
GITHUB_CLIENT_ID=< Get from Github Developer API >
GITHUB_CLIENT_SECRET=< Get from Github Developer API >
GITHUB_CALLBACK=http://localhost:8080/auth/github/redirect
AWS_ACCESS_KEY_ID=< Get from AWS >
AWS_SECRET_KEY=< Get from AWS >
S3_BUCKET_NAME=< s3 bucket name for uploaded pins>
NODE_ENV=<development|production>
DEBUG=Pinterest-Clone:server
DEBUG_COLORS=1
GOOGLE_APPLICATION_CREDENTIALS=< service account key path for cloud vision api >
OPENAI_API_KEY=<Get from openAI>

Run the development environment

npm run dev

You can now go to http://localhost:8080/ and see the project running in dev mode.

B) Docker

If you have docker installed and a .env file with contents from above, then from the root dir:

  1. Build and run the images
docker-compose up
  1. Go to http://localhost:8080/
  • Note: MONGOLAB_URI is already incorporated in the local docker setup and is not needed for your env file if fully running with docker.

Testing

npm test

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone who's code was used

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published