A React Native project created using Expo.
Aora is a short videos application where users can upload new videos, like, and save videos. This app provides an engaging platform for users to share and discover short-form video content. It leverages the power of React Native to create a smooth, native-like experience on both Android and iOS devices.
React Native is an open-source mobile application framework created by Facebook. It allows developers to use React along with native platform capabilities to build mobile applications. With React Native, you can create truly native apps and do it all with a single codebase, which is shared between platforms. This significantly speeds up development and ensures a consistent look and feel across different devices.
To get started with this project, follow these steps:
-
Install dependencies:
npm install
-
Start the app:
npx expo start
You'll find options to open the app in a development build, Android emulator, iOS simulator, or Expo Go.
The project structure is as follows:
app/
- Main application codeassets/
- Image and other assetscomponents/
- Reusable componentsconstants/
- Application constantscontext/
- React context for state managementhooks/
- Custom hookslib/
- Utility functions and librariesscripts/
- Automation scripts
-
Sign Up / Log In to Appwrite: Visit Appwrite Cloud and sign up or log in.
-
Create a Project:
- Go to the Appwrite console.
- Click on "Create Project".
- Enter your project name and select your region.
-
Add a Platform:
- Select a platform to add.
- Name your Android app and the package name.
- Add a new platform and follow the instructions for your target platform.
-
Create a Database:
- Go to your project dashboard.
- Click on "Databases".
- Click on "Create Database".
-
Create Collections:
-
Within your database, click on "Create Collection" and add the following collections:
Users Collection:
username
(String)email
(Email)avatar
(URL)accountId
(String)- Allow CRUD permissions for Any user.
Videos Collection:
title
(String)thumbnail
(URL)prompt
(String)video
(URL)creator
(Relationship: Many to One with Users)- Allow CRUD permissions for Users.
Saved Collection:
users
(Relationship: Many to One with Users)videos
(Relationship: Many to One with Videos)- Allow CRUD permissions for Users.
-
-
Get Collection IDs:
- After creating each collection, note down the collection IDs from the collection settings.
-
Create Storage:
- Go to your project dashboard.
- Click on "Storage".
- Click on "Create Bucket".
- Enter your bucket name 'files'.
- Give CRUD permissions to Users and READ permission to Guests.
- Set maximum fil size to 50 megabytes.
- Add allowed file extensions png, gif, mp4, jpg, jpeg.
Create a config.js file in the lib directory and use the following configuration in your project:
export const config = {
endpoint: "https://cloud.appwrite.io/v1",
platform: "YOUR_PACKAGE_NAME",
projectId: "YOUR_PROJECT_ID",
databaseId: "YOUR_DATABASE_ID",
userCollectionId: "YOUR_USER_COLLECTION_ID",
videoCollectionId: "YOUR_VIDEO_COLLECTION_ID",
savedCollectionId: "YOUR_SAVED_COLLECTION_ID",
storageId: "YOUR_STORAGE_ID",
};
In the project directory, you can run:
This command will move the starter code to the app-example
directory and create a blank app
directory for development.
To learn more about developing with Expo, check out these resources: