{"id":21895301,"url":"https://github.com/persianturtle/react-auth","last_synced_at":"2026-04-13T04:05:09.559Z","repository":{"id":114586605,"uuid":"277220223","full_name":"persianturtle/react-auth","owner":"persianturtle","description":"We're developing a SPA with authentication from scratch.","archived":false,"fork":false,"pushed_at":"2020-07-05T02:53:39.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-23T05:04:13.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/persianturtle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-07-05T02:53:18.000Z","updated_at":"2023-03-05T03:36:58.000Z","dependencies_parsed_at":"2023-06-26T03:56:21.133Z","dependency_job_id":null,"html_url":"https://github.com/persianturtle/react-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/persianturtle/react-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persianturtle%2Freact-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persianturtle%2Freact-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persianturtle%2Freact-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persianturtle%2Freact-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/persianturtle","download_url":"https://codeload.github.com/persianturtle/react-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persianturtle%2Freact-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261417568,"owners_count":23155073,"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","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-11-28T13:34:02.010Z","updated_at":"2026-04-13T04:05:04.520Z","avatar_url":"https://github.com/persianturtle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Auth\n\nWe're developing a SPA with authentication from scratch.\n\n## Table of contents\n\n- [Getting Started](#getting-started)\n- [Docker](#docker)\n  - [What is a service?](#what-is-a-service)\n  - [Starting the development environment](#starting-the-development-environment)\n  - [Stopping the development environment](#stopping-the-development-environment)\n  - [Restarting a service](#starting-a-service)\n  - [Viewing logs](#viewing-logs)\n  - [SSH into a service](#ssh-into-a-service)\n- [Database](#database)\n  - [Scripts](#scripts)\n\n## Getting started\n\nThis project has three dependencies:\n\n1. Clone this repo\n2. Install [Docker](https://docs.docker.com/get-docker/)\n3. [Node](https://nodejs.org/en/download/) (which includes `npm`)\n\nRun `npm start` from the root of the project to start the docker services. That command will then run `docker-compose up` after first running `docker-compose down`. Press `CTRL + C` to kill that process. However, even after killing the process, the docker services will still be running. See [stopping the development environment](#stopping-the-development-environment) to shut those containers down.\n\nAfter running `npm start`, you should be able to access [http://localhost](http://localhost).\n\nNotes:\n\n- the first time you run this command, Docker will have to download the image dependencies, so it may take a couple of minutes\n- subsequent runs should take around 30 seconds\n- while the development environment is running, you're able to change client related code and see the changes reflected in the browser\n- when editing webpack config, you'll need to [restart the client service](#starting-a-service)\n- when editing the api server, you'll need to [restart the api service](#starting-a-service)\n- when editing `docker-compose.yml`, you'll need to re-run `npm start`\n\n## Docker\n\n### What is a \"service\"?\n\nServices are defined in `docker-compose.yml`.\n\n```yml\nversion: \"3.8\"\nservices:\n  client: ...\n  api: ...\n  db: ...\n```\n\nWe have three services defined: `client`, `api` and `db`.\n\n### Starting the development environment\n\nRun `docker-compose up` from the project root. This will run each service defined in `docker-compose.yml`.\n\nTips\n\n- `docker-compose up -d` will run a background process\n- `docker ps -a` will list all containers and their status\n- learn more about [docker-compose](https://docs.docker.com/compose/)\n\n### Stopping the development environment\n\nRun `docker-compose down` from the project root. This will tear down all services defined in `docker-compose.yml`.\n\nTips:\n\n- `docker-compose down --remove-orphans` will remove containers for services not defined in `docker-compose.yml`\n\n### Restaring a service\n\nRun `docker-compose restart [service]` from the project root. This is helpful for things like restarting a Node server.\n\n### Viewing logs\n\nRun `docker-compose logs` from the project root to see logs for all services. This is helpful when debugging.\n\n### SSH into a service\n\nRun `docker-compose exec [service] bash` from the project root. This will connect you to a running service via SSH.\n\nTips:\n\n- Remember that each container is ephemeral; whatever changes you make won't be persisted after running `docker-compose down`\n- You may notice that packages you would normally expect in a linux environment are missing; feel free to install anything you need via `apt-get`\n\n## Database\n\nTo SSH into the database, run `docker-compose exec db bash` (see [SSH into a service](#ssh-into-a-service)).\n\n### Scripts\n\nThe `package.json` file located at the root of the project has some helpful database scripts.\n\n- `npm run db:recreate` will first drop and then recreate all database tables\n- `npm run db:populate` will populate the database tables with dummy data\n- `npm run db:selectUsers` will query the database for all registered users\n\nThe coresponding SQL files that are executed can be found in `/db`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersianturtle%2Freact-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpersianturtle%2Freact-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersianturtle%2Freact-auth/lists"}