{"id":13679993,"url":"https://github.com/atahani/reactjs-unsplash","last_synced_at":"2025-04-29T19:32:28.852Z","repository":{"id":51691872,"uuid":"98041796","full_name":"atahani/reactjs-unsplash","owner":"atahani","description":"How to develop a React web application like Unsplash.com from scratch.","archived":false,"fork":false,"pushed_at":"2019-01-22T12:04:16.000Z","size":2839,"stargazers_count":36,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T22:35:48.758Z","etag":null,"topics":["jest","jest-snapshots","reactjs","redux","redux-form","redux-saga","styled-components","unsplash-api"],"latest_commit_sha":null,"homepage":"https://faranesh.com/web/16454-clone-unsplashcom-with-reactjs--redux?referral=github","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atahani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-22T15:55:32.000Z","updated_at":"2023-10-27T20:26:32.000Z","dependencies_parsed_at":"2022-08-23T01:10:32.136Z","dependency_job_id":null,"html_url":"https://github.com/atahani/reactjs-unsplash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahani%2Freactjs-unsplash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahani%2Freactjs-unsplash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahani%2Freactjs-unsplash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahani%2Freactjs-unsplash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atahani","download_url":"https://codeload.github.com/atahani/reactjs-unsplash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251569560,"owners_count":21610576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","jest-snapshots","reactjs","redux","redux-form","redux-saga","styled-components","unsplash-api"],"created_at":"2024-08-02T13:01:11.848Z","updated_at":"2025-04-29T19:32:23.821Z","avatar_url":"https://github.com/atahani.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/atahani/reactjs-unsplash.svg?branch=master)](https://travis-ci.org/atahani/reactjs-unsplash)\n\n# Unsplash Clone\n\n## Introduction\n\nThis project was developed to demonstrate how you can develop a React.js web application like [unsplash](https://unsplash.com/) from scratch. All of the components have been developed without any third parties library like [react-bootstrap](https://react-bootstrap.github.io/). If you understood Persian, you would be able to enroll this course in [Faranesh.com.](https://faranesh.com/web/16454-clone-unsplashcom-with-reactjs--redux)\n\n\u003e This project has written only for educational purpose. So we don't want to abuse the name or idea of [unsplash.com](https://medium.com/unsplash/unsplash-api-guidelines-28e0216e6daa).\n\n## How Does It Look Like?\n\n![Home Page](images/home.png)\n![Home Page in Mobile](images/home-mobile.png)\n![Search Page](images/search.png)\n![Create New Collection Dialog](images/create-new-collection.png)\n![Add Image to Collections Dialog](images/add-image-to-collections.png)\n\n## Some Libraries that have been used\n\n#### Flow\n\nEverybody nags about JavaScript is loosely typed language, and most of the bugs come from this feature. There are two ways to handle static type checking, [TypeScript](https://www.typescriptlang.org/), and [flow](http://flow.org/). I've used flow since I love ES6 syntax.\n\n#### Jest\n\n[Jest](https://facebook.github.io/jest/) is the best tool for testing React.js applications. It has some cool features like [Snapshot](https://facebook.github.io/jest/docs/en/snapshot-testing.html).\nSince this project was developed for educational, Only some tests have been written to demonstrate how tests should be by Jest library.\n\n#### styled-components\n\nThere are many libraries to handle style in React. One of the best libraries is [styled-component](https://www.styled-components.com/) since you can manage style of components base on behaviors.\n\n#### Redux Persist\n\n[Redux](https://redux.js.org/) was used as store management Since we don't want to lose user informations such as user profile or access token. [Redux Persist](https://github.com/rt2zz/redux-persist) was used to store user state into local storage. The configuration is easier than you would think!\n\n## Pre Requirements\n\n1.create new application\n\nSince this project is based on [unspalsh API](https://unsplash.com/documentation) you need to have an application. Follow [this link](https://unsplash.com/oauth/applications/new) to create a new application. You need to set these permissions.\n\n```\npublic\nread_photos\nwrite_likes\nread_collections\nwrite_collections\n```\n\n\u003e NOTE: The `Redirect URI` is `http://localhost:3000/auth/callback` in development mode base on default settings.\n\n2. create a file with `.env.development` OR `.env.production` name to set environment variables like `.env`.\n\n*For more information please see the [create-react-app documentation](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-custom-environment-variables).*\n\n```\nNODE_ENV=development\n\nREACT_APP_ROOT_URL=https://unsplash.com\n\nREACT_APP_API_ROOT=https://api.unsplash.com/\n\nREACT_APP_CLIENT_ID=XXXXXXXXXXXXX\n\nREACT_APP_CLIENT_SECRET=XXXXXXXXXXXXX\n\nREACT_APP_OAUTH_PATH=https://unsplash.com/oauth/authorize?client_id=XXXXXXXXXXXXX\u0026redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fcallback\u0026response_type=code\u0026scope=public+read_photos+write_likes+read_collections+write_collections\n\nREACT_APP_REDIRECT_URI=http://localhost:3000/auth/callback\n```\n\n## Project Commands\n\n#### Start App in Development Mode\n```\nnpm run start\n```\n\n#### Test\n\n```\nnpm run test\n```\n\n#### Test in Watch Mode\n\n```\nnpm run test-w\n```\n\n#### Flow Checking\n\n```\nnpm run flow\n```\n\n#### Linting\n\n```\nnpm run lint\n```\n\n#### Build Project in Production Mode\n\n```\nnpm run build\n```\n\n#### Build and Run Server\n\n```\nnpm run build-and-run-server\n```\n\n#### Run Server Only\n\n```\nnpm run run-server\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatahani%2Freactjs-unsplash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatahani%2Freactjs-unsplash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatahani%2Freactjs-unsplash/lists"}