Skip to content

Commit

Permalink
Remove web app, replace monorepo with tamagui-expo starter (#28)
Browse files Browse the repository at this point in the history
* readme link

* Move tamagui/solito app into prev

* readme

* web

* link PR

* npx create-expo-app arc3 -t tamagui-expo-template --no-install

* axe prev dir

* axe WSL scripts, add devclient script

* axe prev readme

* android and ios

* yarn

* pkg json meta

* bundle names

* prettier autofix

* nullchecks and thats pretty

* configs

* eas config

* fix eas config

* add android build script

* before simplify further

* upgrade tamagui

* before byebye

* removing expo-updates pain in the ass

* try this pkg json

* cleanup and reprettier

* clean out a bunch

* android build apk

* build script

* screen shh

* fix matchMedia warning w createMedia

* tsconfig strict

* simple APK shh ok

* simplify homescreen

* copy stuff in and start chopping up

* chatgpt you beautiful bastard

* type fixes - axe db for now

* axe old channelpreview

* typefixes

* channelpreview cleanup and install flashlist

* add babel path imports thehheheheheh

* add paths to tsconfig for typechecking

* fix type errors

* description

* patch nostr shite cuz their type errors interfere with ours

* simplify home screen

* connect usenavigation

* aaaaaaaaand expo random

* isntaltlsaifnasdf

* na trnaslucantst ioasdfj aosidfj abr abr

* set up initial nostr subscriptions once on authednav

* before refactor channelscreen

* fix back and title of channel header

* fix tab border

* harmonize borders betw top and bottom

* shh

* fix useMessagesForChannel

* reconnect useTheme

* chat use nostr class to publish

* and redir properly on createaccount

* console cleanup shh

* logofixes
  • Loading branch information
AtlantisPleb authored Jan 8, 2023
1 parent 2a5021c commit 7b3c4ba
Show file tree
Hide file tree
Showing 161 changed files with 3,018 additions and 6,408 deletions.
46 changes: 46 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'universe/native',
'universe/shared/typescript-analysis',
'prettier',
],
plugins: ['simple-import-sort'],
rules: {
// We will use TypeScript's types for component props instead
'react/prop-types': 'off',

// Why would you want unused vars?
'@typescript-eslint/no-unused-vars': 'warn',

// I suggest this setting for requiring return types on functions only where useful
'@typescript-eslint/explicit-function-return-type': 'off',

// Includes .prettierrc.js rules
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
printWidth: 80,
tabWidth: 2,
singleQuote: true,
bracketSameLine: false,
trailingComma: 'es5',
arrowParens: 'always',
semi: false,
fix: true,
},
{ usePrettierrc: false },
],
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': 'warn',
},
overrides: [
{
files: ['*.ts', '*.tsx', '*.d.ts', '*.json'],
parserOptions: {
project: './tsconfig.json',
},
},
],
}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:


jobs:
release:
name: Bump Version and Release
runs-on: ubuntu-latest
steps:
- name: Setup Repo
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: yarn

- name: Install dependencies
run: yarn install

- name: Semantic release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

65 changes: 16 additions & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,54 +1,22 @@
prelogo.png

android/
ios/
*.apk

/node_modules
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# expo
**/.expo/*

# next.js
**/.next/*
/out/

# tamagui
**/.tamagui/*

# production
/build

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo
node_modules/
constants/secrets.ts
.yarn/cache
google-services.json
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/

# os
# macOS
.DS_Store
THUMBS_DB
thumbs.db

# @generated expo-cli sync-b25d41054229aa64f1468014f243adfae8268af2
# @generated expo-cli sync-e7dcf75f4e856f7b6f3239b3f3a7dd614ee755a8
# The following patterns were generated by expo-cli

# OSX
Expand Down Expand Up @@ -83,7 +51,6 @@ build/
local.properties
*.iml
*.hprof
.cxx/

# node.js
#
Expand Down
9 changes: 6 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"trailingComma": "es5",
"semi": false,
"endOfLine": "auto",
"printWidth": 80,
"tabWidth": 2,
"singleQuote": true,
"bracketSameLine": false,
"trailingComma": "es5",
"arrowParens": "always",
"printWidth": 100
"semi": false
}
1 change: 0 additions & 1 deletion .watchmanconfig

This file was deleted.

Binary file added .yarn/install-state.gz
Binary file not shown.
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-after-install.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable */
//prettier-ignore
module.exports = {
name: "@yarnpkg/plugin-after-install",
factory: function (require) {
var plugin=(()=>{var g=Object.create,r=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var I=t=>r(t,"__esModule",{value:!0});var i=t=>{if(typeof require!="undefined")return require(t);throw new Error('Dynamic require of "'+t+'" is not supported')};var h=(t,o)=>{for(var e in o)r(t,e,{get:o[e],enumerable:!0})},w=(t,o,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of C(o))!y.call(t,n)&&n!=="default"&&r(t,n,{get:()=>o[n],enumerable:!(e=x(o,n))||e.enumerable});return t},a=t=>w(I(r(t!=null?g(k(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var j={};h(j,{default:()=>b});var c=a(i("@yarnpkg/core")),m={afterInstall:{description:"Hook that will always run after install",type:c.SettingsType.STRING,default:""}};var u=a(i("clipanion")),d=a(i("@yarnpkg/core"));var p=a(i("@yarnpkg/shell")),l=async(t,o)=>{var f;let e=t.get("afterInstall"),n=!!((f=t.projectCwd)==null?void 0:f.endsWith(`dlx-${process.pid}`));return e&&!n?(o&&console.log("Running `afterInstall` hook..."),(0,p.execute)(e,[],{cwd:t.projectCwd||void 0})):0};var s=class extends u.Command{async execute(){let o=await d.Configuration.find(this.context.cwd,this.context.plugins);return l(o,!1)}};s.paths=[["after-install"]];var P={configuration:m,commands:[s],hooks:{afterAllInstalled:async t=>{if(await l(t.configuration,!0))throw new Error("The `afterInstall` hook failed, see output above.")}}},b=P;return j;})();
return plugin;
}
};
28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

785 changes: 785 additions & 0 deletions .yarn/releases/yarn-3.2.0.cjs

Large diffs are not rendered by default.

783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.3.cjs

This file was deleted.

12 changes: 7 additions & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
enableGlobalCache: true

enableTelemetry: false

logFilters:
Expand All @@ -9,13 +11,13 @@ logFilters:
level: discard
- code: YN0076
level: discard
- code: YN0013
level: discard

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
- path: .yarn/plugins/@yarnpkg/plugin-after-install.cjs
spec: "https://raw.githubusercontent.com/mhassan1/yarn-plugin-after-install/v0.3.1/bundles/@yarnpkg/plugin-after-install.js"

yarnPath: .yarn/releases/yarn-3.2.0.cjs

yarnPath: .yarn/releases/yarn-3.2.3.cjs
afterInstall: yarn postinstall
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

A cross-platform [Nostr](https://github.com/nostr-protocol/nostr) client, currently pre-alpha.

We use [React Native](https://reactnative.dev/), [Expo](https://expo.dev/), and [Tamagui](https://tamagui.dev/) to target Android, iOS & web with one codebase.

The `main` branch is automatically deployed to [alpha.thearcapp.com](https://alpha.thearcapp.com). It may or may not be usable.
We use [React Native](https://reactnative.dev/), [Expo](https://expo.dev/), and [Tamagui](https://tamagui.dev/) to target Android & iOS with one codebase.

Follow [@TheArcApp on Twitter](https://twitter.com/TheArcApp) for updates.

Expand All @@ -22,7 +20,6 @@ Current and upcoming features in order of priority:
- [x] Key backup ([#23](https://github.com/ArcadeLabsInc/arc/pull/23))
- [x] Pick UI theme ([#23](https://github.com/ArcadeLabsInc/arc/pull/23))
- [x] Show user kind-0 name & picture ([#25](https://github.com/ArcadeLabsInc/arc/pull/25))
- [x] Add mobile over-the-air updates via [expo-updates](https://docs.expo.dev/versions/latest/sdk/updates/)
- [ ] Twitter-style profiles
- [ ] Display [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) identifiers
- [ ] Look up user by NIP-05 identifier
Expand Down Expand Up @@ -65,6 +62,12 @@ Current and upcoming features in order of priority:

[Tweet us](https://twitter.com/TheArcApp) any feature requests.

## Web Support

As of [#28](https://github.com/ArcadeLabsInc/arc/pull/28), we removed the web app to focus first on Android and iOS apps. We will re-add web support later.

The previous web app will remain available temporarily at [alpha.thearcapp.com](https://alpha.thearcapp.com), but will not receive updates.

## Architecture

Documenting on our wiki:
Expand Down
19 changes: 19 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ConfigContext, ExpoConfig } from "@expo/config";

const IS_DEV = process.env.APP_VARIANT === "development";
const IS_BETA = process.env.APP_VARIANT === "beta";

export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: IS_DEV ? `[DEV] ${config.name ?? ""}` : config.name ?? "Arc",
slug: config.slug ?? "arc",
icon: IS_DEV
? "./src/assets/icons/icon-dev.png"
: IS_BETA
? "./src/assets/icons/icon-beta.png"
: "./src/assets/icons/icon.png",
android: {
...config.android,
package: IS_DEV ? "arcade.labs.arc.devclient" : "arcade.labs.arc",
},
});
29 changes: 5 additions & 24 deletions apps/expo/app.json → app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,30 @@
"version": "0.0.1",
"sdkVersion": "47.0.0",
"jsEngine": "hermes",
"platforms": [
"ios",
"android",
"web"
],
"scheme": "myapp",
"platforms": ["ios", "android"],
"orientation": "portrait",
"icon": "./assets/icon.png",
"icon": "./src/assets/icons/icon.png",
"userInterfaceStyle": "dark",
"splash": {
"image": "./assets/splash.png",
"image": "./src/assets/icons/splash.png",
"resizeMode": "cover",
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/4d0739d3-08f0-42a8-a886-2d89327949a1"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "arcade.labs.arc"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"foregroundImage": "./src/assets/icons/adaptive-icon.png",
"backgroundColor": "#000000"
},
"package": "arcade.labs.arc",
"versionCode": 3
},
"web": {
"favicon": "./assets/favicon.png"
"versionCode": 4
},
"extra": {
"eas": {
"projectId": "4d0739d3-08f0-42a8-a886-2d89327949a1"
}
},
"runtimeVersion": {
"policy": "sdkVersion"
}
}
}
Loading

0 comments on commit 7b3c4ba

Please sign in to comment.