{"id":13702274,"url":"https://github.com/winterstein/sogive-app","last_synced_at":"2025-09-01T07:32:57.399Z","repository":{"id":15935204,"uuid":"79010817","full_name":"winterstein/sogive-app","owner":"winterstein","description":"The SoGive user app - See your impact","archived":false,"fork":false,"pushed_at":"2025-01-10T18:33:43.000Z","size":144493,"stargazers_count":2,"open_issues_count":126,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-08T09:08:16.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winterstein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-15T07:36:09.000Z","updated_at":"2025-01-10T18:33:47.000Z","dependencies_parsed_at":"2025-01-10T19:44:18.644Z","dependency_job_id":null,"html_url":"https://github.com/winterstein/sogive-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/winterstein/sogive-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winterstein%2Fsogive-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winterstein%2Fsogive-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winterstein%2Fsogive-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winterstein%2Fsogive-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winterstein","download_url":"https://codeload.github.com/winterstein/sogive-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winterstein%2Fsogive-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273088767,"owners_count":25043559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T21:00:33.114Z","updated_at":"2025-09-01T07:32:57.241Z","avatar_url":"https://github.com/winterstein.png","language":"HTML","funding_links":[],"categories":["Awesome tech for good projects"],"sub_categories":[],"readme":"# sogive-app\n\nThe SoGive user app - See your impact.\n\nTry it out: \u003chttps://app.sogive.org\u003e\n\nThis repo contains both the Java server code and the js client code.\n\n## Javascript: Front-End Installation\n\n### Linux\n\n1. Install npm, and less\n\n2. Make a folder to hold this repo + its siblings. We'll name this winterwell, after the company that wrote the original code.\n\n       cd ~\n       mkdir winterwell\n       cd winterwell\n\n3. Clone this repo, and its sibling wwappbase.js (which contains widgets and utility code)\n\n       git clone git@github.com:winterstein/sogive-app.git\n       git clone git@github.com:winterstein/wwappbase.js.git\n\nNote: the sogive-app repo contains some symlinks to folders in the wwappbase.js repo. Your folders should look like this:\n\n\twinterwell\n\t\t/sogive-app\n\t\t/wwappbase.js\n\n1. Install npm packages\n\n       cd sogive-app\n       npm i\n\n2. Compile the js and the css (and - joy! - watch for edits). \n\n       ./watch.sh\n       \nNote: This is done using `webpack` and `webpack.config.js`. The watch.sh script is a handy way of doing that during development. On the production server, we use `npm run compile`.\n\n6. Setup a local web-server (e.g. nginx or http-server) serving the sogive-app/web folder. For example, for nginx:  \n  \t\n\t1. Install nginx (the command below is for debian-flavour Linux, eg Ubuntu or Mint)\n\t\n  \t\t\tsudo apt install nginx\n  \n  \t2. Copy the config file to nginx. Following convention, it goes in two places, symlinked together:\n\t\n\t\t\tcd /etc/nginx/sites-available\n\t\t\tsudo cp ~/winterwell/sogive-app/config/local.sogive.org.nginx .\n\t\t\tcd ../sites-enabled\n\t\t\tsudo ln -s ../sites-available/local.sogive.org.nginx .\n\t\n\t3. The config file expects the sogive files to be in a \"standard\" place, so let's make them accessible there with a symlink:\n\t\n\t\t\tsudo ln -s ~/winterwell /home/winterwell\n\n\t4. Restart nginx\n\t\n\t\t\tsudo service nginx restart\n\n7. Modify your `/etc/hosts` file to have `127.0.0.1 local.sogive.org`\n\n\t\tsudo nano /etc/hosts\n\nThen add the line: `127.0.0.1 local.sogive.org`   \nand save (Control-X to exit, and follow the prompts)\n\n8. Test: You should be able to view your local SoGive from a browser at http://local.sogive.org. It may fail to connect with a backend server, and emit an error. But you can check the js compilation is working.\n\n9.If you got a connection error - Edit src/js/plumbing/ServerIO.js and uncomment the line:\n\t`ServerIO.APIBASE = 'https://test.sogive.org';`\nYour local SoGive should now connect to a test server, which has some data.\n\n10 Celebrate as you see best. Ask Sanjay if you want a recommendation for\na high impact celebration.\n\n### Mac OS\n\n1. Follow steps 1 - 5 in the Linux instructions to install npm, clone the repositories and run `npm i` \u0026 `./watch.sh`.\n\n\n2. **(Update April 2024: nginx on Mac is maybe hard-work -- see notes for http-server below)** Setup a local web-server (e.g. nginx or http-server) serving the sogive-app/web folder. For example, for nginx:  \n\n\t1. Install nginx\n\t\t```\n\t\tbrew install nginx\n\t\t```\n\t\n  \t2. Copy the config file to nginx. Following convention, it goes in two places, symlinked together:\n\t\t```\n\t\tcd /usr/local/etc/nginx/sites-available\n\t\tsudo cp ~/winterwell/sogive-app/config/local.sogive.org.nginx .\n\t\tcd ../sites-enabled\n\t\tsudo ln -s ../sites-available/local.sogive.org.nginx .\n\t\t```\n\t3. The config file expects the sogive files to be in `/home/winterwell`, so open the file and change that to\n\tthe location of your winterwell directory.\n\t\t```\n\t\tcd ../sites-available\n\t\tsudo nano local.sogive.org.nginx\n\t\t```\n\n\t\tReplace the path in `root /home/winterwell/sogive-app/web` to the full path of `sogive-app/web` on your Mac, e.g.\n\t\t```\n\t\troot /Users/anita/winterwell/sogive-app/web;\n\t\t```\n\t\t\n\t\tSave and exit (Ctrl-X, 'y', Enter).\n\n\t4. Modify the nginx config to include the sites-enabled directory:\n\t\t```\n\t\tcd /usr/local/etc/nginx\n\t\tsudo nano nginx.conf\n\t\t```\n\t\t\n\t\tAdd the following line within the `http { }` section:\n\n\t\t```\n\t\tinclude /usr/local/etc/nginx/sites-enabled/*;\n\t\t```\n\t\t\n\t\tSave and exit (Ctrl-X, 'y', Enter).\n\t\n\t5. Restart nginx\n\t\t```\n\t\tsudo nginx -s reload\n\t\t```\n\n4. Continue following Linux instructions from Step 7 (\"Modify your `/etc/hosts` file ...\")\n\n### (April 2024 - rough notes!!) What we did to make it work for S.E\n\nInstall http-server globally:\n\n\tsudo npm i -g http-server\n\nIn one terminal window, run:\n\n\tcd winterwell/sogive-app/web\n\thttp-server\n\nThis will output a url like: http://127.0.0.127:8080\nOpen that in your web browser.\n\nIn a 2nd terminal window, run this to compile the site:\n\n\tcd winterwell/sogive-app\n\t./watch.sh\n\n\n## Java: Server Installation\n\nNot needed for UI edits, but if you want to do backend database work...\n\nRecommended minimum system requirements: Linux with \u003e 8gb ram and better than Intel i3\n\n1. Install Java (e.g. via apt-get install default-jdk)\n\n2. Install ElasticSearch. June 2020: We now use version 7\n\n3. Install Bob:\n\n       sudo npm i -g java-bob\n\n4. Download \u0026 install [the Eclipse IDE](https://www.eclipse.org/downloads/) for Java development\n\n5. Import sogive-app into Eclipse (File \u003e Open Projects from Filesystem)\n\n   You will notice some errors in Eclipse's Problems panel.\n\n6. To fix missing Java project dependencies, clone the following repositories and import them into\n   Eclipse:\n\n   - https://github.com/sodash/open-code \n\n     ```\n     cd ~/winterwell \u0026\u0026 git clone git@github.com:sodash/open-code.git\n     ```\n\n     In Eclipse, File \u003e Import \u003e General \u003e Import existing projects into workspace\n     \n     In 'Select root directory', browse to `~/wintwerwell/open-code` and check 'Search for nested projects`.\n     Select just the following subdirectories:\n      \n\t      - winterwell.bob\n\t      - winterwell.datalog\n\t      - winterwell.depot\n\t      - winterwell.maths\n\t      - winterwell.optimization\n\t      - winterwell.utils\n\t      - winterwell.web\n\t      - winterwell.webappbase\n\t      - youagain-java-client\n\n     Click [Finish].\n     \n   - https://github.com/good-loop/elasticsearch-java-client\n   \n     ```\n     cd ~/winterwell \u0026\u0026 git clone git@github.com:good-loop/elasticsearch-java-client.git\n     ```\n     \n     File \u003e Import \u003e Import existing projects into workspace. Select root directory ~/winterwell/elasticsearch-java-client and [Finish].\n\n- https://github.com/winterstein/flexi-gson\n\n     ```\n     cd ~/winterwell \u0026\u0026 git clone git@github.com:winterstein/flexi-gson.git\n     ```\n     \n     File \u003e Import \u003e  Import existing projects into workspace. Select root directory ~/winterwell/flexi-gson and [Finish].\n\n7. You will now see 'missing required libraries' errors in Eclipse. To fix these, use Bob to fetch dependency\n   jars in **each of the projects that were imported**. e.g.:\n\n       cd ~/winterwell/sogive-app\n       bob\n       \n   If you see nothing much in the output, run `bob` a second time.\n   \n   Repeat for each project you imported into Eclipse, including each of the sub-directories of open-code that you imported.\n   \n   To get Eclipse to pick up on the new dependencies, right-click on each project and Refresh. \n   You can check dependencies show up in the `dependencies` subdirectory of each project in Eclipse.\n   \n   Do not be alarmed if many more errors appear in Eclipse's Problems panel once you have resolved all the\n   'missing required libraries' - these ones can be ignored.\n\n8. Start ElasticSearch\n\n9. Run SoGive Server -- *Running SogiveServer from inside Eclipse is probably easiest*. \n\n   If you should want to run from the command line, copy the command from Eclipse \u003e Run \u003e Run configurations \u003e [Show Command Line]\n\n10. Some tests:\n    - Test your local ElasticSearch is running: http://localhost:9200\n    - Test your local java SoGiveServer is running: http://localhost:8282\n    - Test nginx is routing your local java SoGiveServer: http://local.sogive.org/manifest\n    - Test your local web-app: http://local.sogive.org/ (make sure to set ServerIO.APIBASE back to `''` to point to the local server)\n   \n\n## Running the tests\n\n### Puppeteer tests\n\nJest Puppeteer tests live in `src/puppeteer-tests/__tests__` and exercise core functionality\nof the website, by clicking on elements and checking that other elements appear as expected.\n\nMost of the tests require account details in order to log in to SoGive. To supply these, create a\nfile called `puppeteer.credentials.js` in `../logins/sogive-app` (relative to this repository\nroot) containing valid account details. For example (dummy values):\n\n\tconst username = 'foo@example.com';\n\tconst password = 'password1';\n\n\tmodule.exports = {\n\t\tusername,\n\t\tpassword,\n\t};\n\n*Note*, most tests require an account with edit rights.\n\nTo run tests, after running `npm install` once to install test dependencies, from the root of the\nrepository, run:\n\n\tnode runtest.js [--site local/test/prod] [--test file-name.js] [-- -t 'Test case name']\n\nwhere\n\n`--site local` runs tests against http://local.sogive.org (default if not specified)\n\n`--site test` runs tests against https://test.sogive.org\n\n`--site prod` runs tests against https://app.sogive.org\n\nAdditional options may be included to control how the tests are run:\n\n- `--head` - show the browser while test is running\n\n- `--chrome` - run tests in Chrome instead of Puppeteer's default browser (Chromium)\n\nIf running with `--head`, it can be useful to run the tests in slow motion. To do this, set\nan environment variable at the start of the command:\n\n- `SLOWMO=[integer]` - introduces [integer] ms delay on each test step\n\nFor example:\n\n`SLOWMO=150 node runtest.js --head`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinterstein%2Fsogive-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinterstein%2Fsogive-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinterstein%2Fsogive-app/lists"}