The current project is a project of social network executed due to the React, Redux, Styled components.
The project used the API calls to back-end, possibility to set up your own user profile, set up the languages and themes.
You can open and use the app by social network app link.
Use free account for login: Email: [email protected]
Password: free
.
To find an author's private profile use the endpoint /profile/26100
inside the app 🙂
The project has multilayer structure:
public
- used to keep static content for buildsapi
- used to keep API calls functionalityassets
- used to keep static contentcomponents
- used to keep react componentsApp
- used to keep main App component...
- rest of componentscommon
- used to keep common for whole app components
fonts
- used to keep fontshoc
- used to keep Higher Order Componentshook
- used to keep hookslocales
- used to keep locales for translationsstore
- used to keep storestyles
- used to keep stylestests
- used to keep teststypes
- used to keep TypeScript common typesutils
- used to keep utils for helping
.
├── public
└── src
├── api
├── assets
├── components
│ ├── App
│ ├── Captcha
│ ├── Dialogs
│ ├── Footer
│ ├── FormPostMessage
│ ├── Header
│ ├── InputField
│ ├── Login
│ ├── Music
│ ├── Navbar
│ ├── News
│ ├── NotFound
│ ├── Paginator
│ ├── PhotoSection
│ ├── Profile
│ │ ├── MyPosts
│ │ └── ProfileInfo
│ ├── Settings
│ ├── TextAreaField
│ ├── Users
│ ├── common
│ │ ├── Avatar
│ │ ├── Button
│ │ ├── Label
│ │ ├── Like
│ │ ├── Loader
│ │ ├── Logo
│ │ ├── Radio
│ │ ├── Select
│ │ └── Toggle
├── fonts
├── hoc
├── hook
├── locales
│ ├── en
│ └── ru
├── store
├── styles
├── tests
├── types
└── utils
The project has the next dependencies in the package.json file.
- Clone project to your PC by the following command:
git clone https://github.com/andreynav/social-network.git
- Open the root directory and enter the following command:
yarn
- In the root directory create
.env
file and add inside it a rowREACT_APP_API_KEY=XXXX
whereXXXX
is your API key for getting back-end. To get API key you need to create your own account on the Social Network API site. Also, you can add a row likePORT=3001
to.env
file, and run the project on the desired port.
To run project, open the root directory and enter the following command:
yarn start
The command runs the app in the development mode. Open http://localhost:3001 to view it in your browser.
To run the tests, open the root directory and enter the following command:
yarn test
Launches the test runner in the interactive watch mode. See the folder tests for information about existing tests.
To run build, open the root directory and enter the following command:
yarn build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.
The project is open source software provided under the Apache License 2.0.