diff --git a/docs/nix_dev_env.md b/docs/nix_dev_env.md --- a/docs/nix_dev_env.md +++ b/docs/nix_dev_env.md @@ -72,7 +72,7 @@ ## Workflow specific prerequisites -On macOS, [installing Xcode](./nix_mobile_setup.md#xcode) is a prerequisite for all workflows. +On macOS, [installing Xcode](./nix_mobile_setup.md#installing-xcode) is a prerequisite for all workflows. - [Web prerequisites](./nix_web_setup.md#nix-web-requisities) - [React Dev Tools Chrome extension](./nix_web_setup.md#react-dev-tools-chrome-extension) @@ -87,6 +87,8 @@ - [Android emulator](./nix_mobile_setup.md#android-emulator) - [Debugging tools](./nix_mobile_setup.md#debugging-tools) - [Reactotron](./nix_mobile_setup.md#reactotron) +- [Services prerequisites](./nix_services_setup.md#nix-services-prerequisites) + - [Docker](./nix_services_setup.md#docker) # Development environment @@ -107,6 +109,8 @@ - [Running mobile app on iOS Simulator](./nix_mobile_workflows.md#running-mobile-app-on-ios-simulator) - [Running mobile app on Android Emulator](./nix_mobile_workflows.md#running-mobile-app-on-android-emulator) - [Running mobile app on physical iOS devices](./nix_mobile_workflows.md#running-mobile-app-on-physical-ios-devices) +- [Services workflows](./nix_services_workflows.md#services-workflows) + - [Running the Identity service](./nix_services_workflows.md#running-the-identity-service) - [Shared workflows](./nix_shared_workflows.md#shared-workflows) - [Inspect database with TablePlus](./nix_shared_workflows.md#inspect-database-with-tableplus) - [Codegen](./nix_shared_workflows.md#codegen) diff --git a/docs/nix_mobile_setup.md b/docs/nix_mobile_setup.md --- a/docs/nix_mobile_setup.md +++ b/docs/nix_mobile_setup.md @@ -2,6 +2,12 @@ ## iOS development +### Installing Xcode + +Go to the [Mac App Store](https://apps.apple.com/us/app/xcode/id497799835) to install Xcode, or if you already have it, to update it to the latest version. + +Once Xcode is installed, open it up. If you are prompted, follow the instructions to install any “Additional Required Components”. + ### Xcode settings First, in Xcode, open the Comm workspace `native/ios/Comm.xcworkspace`. Make sure that you’re signed into Xcode with an Apple Developer account (either the Comm developer team’s or your own). You can see any accounts currently associated with Xcode by navigating to Xcode → Preferences → Accounts. diff --git a/docs/nix_services_setup.md b/docs/nix_services_setup.md new file mode 100644 --- /dev/null +++ b/docs/nix_services_setup.md @@ -0,0 +1,5 @@ +# Nix services prerequisites + +## Docker + +To build and run the services you need to install [Docker](https://docs.docker.com/desktop/) and [Docker Compose](https://docs.docker.com/compose/install) on your system. diff --git a/docs/nix_services_workflows.md b/docs/nix_services_workflows.md new file mode 100644 --- /dev/null +++ b/docs/nix_services_workflows.md @@ -0,0 +1,31 @@ +# Services workflows + +## Running the Identity service + +First, make sure that you've installed Docker (see the [services prerequisites](./nix_services_setup.md#docker) for more information). + +Then, start LocalStack if you haven't already: + +``` +comm-dev services start +``` + +Make sure your LocalStack resources are up to date: + +``` +cd services/terraform +./run.sh +``` + +Next, generate the server keypair used by the `opaque-ke` crate for registration and login. You only need to do this once. + +``` +cd ../services/identity +cargo run keygen +``` + +You're now ready to run the Identity service: + +``` +cargo run server +```