IndieClass is a platform for local talents to connect with clients. Every user can sign up for classes/experiences, or choose to host their own class/experience. The classes can range from a local tech meetup, an outdoor stargazing, to a yoga meditation session by a certified yoga instructor. This app encourages users to explore new experiences, discover new potentials and learn new skills.
In order to get started, you'll need Docker set up on your local machine. To do this, carry out the following steps:
- Download docker
- In the server folder, run the following to set up your environment and database via docker Ensure your ports are set up, see Starting the App
docker-compose up - In the server folder, run the following to ensure docker is running
You should see a response as follows:
docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
The app is build on react native, which means you'll need a way to run the app on a phone or emulator. To do this, you'll need expo, follow the steps below to get it up and running
- Download expo
- Install expo using the following
npm install expo-cli --global
The App uses Google's places API. You'll need to get a key to have the app running.
- Go to Google Cloud Platform and set up a new project by clicking on Select a project (Right next where it says Google Cloud Platform ).
- Navigate to the project itself (you should be able to do this from the projects dashboard), and then hover over APIs & Services and click on Credentials
- Now use the Create Credentials button to create an API Key.
- Set up your environment variables in both the Client and server. In the client, create a
env.jsfile and copy in the information inenv.example.js. SetKEYto the API key you just got from Google. In the server file create a.env file, copy in the details from.env.exampleand set theSECRET_API_KEYas the API key you just got from Google
In order to run authentication via google, you'll need a Android Client ID. To get one, follow the steps below:
- In the Google Cloud Platform project mentioned earlier, create a new set of credentials, but this time, click on OAuth Client ID
- Next go the the Consent Screen, add in your email address, name of project, click next and finally select Android as the Application type
- In your terminal add in the following command to get the Signing-certificate fingerprint
Enter this fingerprint in the consent screen under Signing-certificate fingerprint
openssel rand -base64 32 | openssl sha1 -c - In your terminal add in the following command to get the Package name
Enter the output from this command in the consent screen under Package name
host.exp.exponent - You'll now get a Google OAuth Client ID which you can add in the
env.jsfile under ANDOID_CLIENT_ID
To run the stripe in the sandbox we've set up, you'll need a live publishable stripe API key. To get one, follow the steps below.
- Go to the stripe website and sign up
- Go through the steps to activate your stripe account in the dashboard (Note: You'll have to add in your bank details)
- Click on Get your live API keys and get a live publishable API Key
- Add the key to your
env.jsfile under STRIPE_LIVE_PUBLISHABLE_KEY
- Use the
.envfile you created earlier using the.env.examplefile as a template. Here, set up the DATABASE_URL with your chosen port by updating thePORTin that line. This port number should be reflected in thedocker-compose.ymlfile as the first number under ports. e.g. XXXX:5432 - In the server folder, run the following
node index.js - In the client folder
This will open a page on your browser from which you can run the app on an emulator or phone
expo start
- Download Android Studio
- Open up Android Studio once downloaded. Under Configure, click on AVD Manager.
- Click on Create Virtual Device. Here you can select an Android phone to emulate, and then click Next.
- Download a system image (The download will be in the range of 10GB), and then click Next and Finish.
- Now you'll be able to hit the play button in the Your VirtualDevices page and an android phone will show up for you to run your app. From the expo page open in the browser, you'll be able to open the app by clicking on Run on Android device/emulator
This project runs on react native with expo and uses docker to set up the environment. To see your database in table format, you can connect the database using using TablePlus
