Contacts is a simple-to-use app that will help in your everyday life to manage your contacts. You can add, edit and delete them with just a few cliks. The idea is to not complicate things that are simple. No menus are needed to manage this app, just a good work flow.
The app is not hosted on the app store or Google store. So, to run it locally you will need to follow these instructions.
- Go to [React Native Page] (https://facebook.github.io/react-native/docs/getting-started.html)
- Choose Building Projects with Native Code (I choose this option just in case I needed to write some iOS or Android native).
- Follow those instruction based on your local machine.
Below you'll find information about performing common tasks. The most recent version of this guide is available here.
- Create a folder on your local machine.
- Then clone/download this repository
https://github.com/ededej/ContactReact.git - Go to directory:
cd ContactReact/ - Install the dependencies need for the app:
npm install
The react app is ready now. Please follow the Available Scripts to run the application in different devices. If you have issues with any of the scripts please got React Native page for more help about your environment.
Folder Structure Android/iOS has all the native code. No code changes have been made, if necessary it will be used for device type specific requirements.
app/ folder is where all the code for the app is located.
components/ has code that will be used across different screens or services.
- components/ContactForms contains forms to be used by ContactAddScreen and ViewContactScreen
domain.model/ it is here for typescript interfaces that will bind to object to make more type safety. to be used by components, service or screens. Having objects type design into react.
- /domain.model/contact to be used across the app
persistence/ is service package that will contain components that will deal with persistence locally, database or cloud.
- persistence/SimpleAsyncStorage I have used SimpleAsyncStorage as persistence for contacts information. It is cross platforms saving service and keeps data secure to be used by only this app.
screens/ contains all the different screen that we can navigate. App.js has stackNavigtor where the screens are defined to be used.
- /screens/HomeScreen/ is the home screen for the app that will display the list.
- /screens/ViewContactScreen it will show full details of contacts, edit or delete the contact from the list.
- /screens/ContactAddScreen it will add the contact to the list.
To generate apk for android we need to follow this guide on react:Generating Signed APK. Dowload the genereated apk on your phone. That is your producation version of the app.
To build production ready to be install by other device we need to follow this guide: Building Your App For Production
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing.
Like npm start, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed.
Like npm start, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see React Native docs for detailed setup).
Runs your app in development mode.
Open it in the Expo app on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal.
Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the --reset-cache flag to the start script:
npm start -- --reset-cache
# or
yarn start -- --reset-cache
Runs the jest test runner on your tests.
Ermal Dedej
This project is licensed under the MIT License - see the LICENSE.md file for details