{"id":19725880,"url":"https://github.com/ksafranski/spaq","last_synced_at":"2025-04-30T00:31:48.901Z","repository":{"id":50386616,"uuid":"81609262","full_name":"ksafranski/spaq","owner":"ksafranski","description":"Template for quickly setting up an SPA","archived":false,"fork":false,"pushed_at":"2017-07-27T13:08:16.000Z","size":489,"stargazers_count":44,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T20:24:54.096Z","etag":null,"topics":["docker","express","mern-stack","nodejs","react","spa"],"latest_commit_sha":null,"homepage":"","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/ksafranski.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}},"created_at":"2017-02-10T21:40:32.000Z","updated_at":"2024-01-02T03:08:58.000Z","dependencies_parsed_at":"2022-08-30T16:51:09.169Z","dependency_job_id":null,"html_url":"https://github.com/ksafranski/spaq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksafranski%2Fspaq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksafranski%2Fspaq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksafranski%2Fspaq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksafranski%2Fspaq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksafranski","download_url":"https://codeload.github.com/ksafranski/spaq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251607822,"owners_count":21616846,"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":["docker","express","mern-stack","nodejs","react","spa"],"created_at":"2024-11-11T23:33:37.658Z","updated_at":"2025-04-30T00:31:48.219Z","avatar_url":"https://github.com/ksafranski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://img.shields.io/circleci/project/github/Fluidbyte/spaq/master.svg)](https://circleci.com/gh/Fluidbyte/spaq)\n[![Codecov](https://img.shields.io/codecov/c/github/Fluidbyte/spaq.svg)](https://codecov.io/gh/fluidbyte/spaq)\n\n# SPAQ\n**Single Page App, Quick!**\n\n## Summary:\n\nA server and client setup to allow for rapid prototyping SPA's. The goal of this project is to make few assumptions and setup everything needed to start development imediately.\n\n**[Server](/server/README.md)** Express-based server that serves both the static assets (`/client`) and an API. ([Documentation](/server/README.md))\n\n**[Client](/client/README.md)** React SPA with basic starting components, SystemJS and Bootstrap. ([Documentation](/client/README.md))\n\n## Quick Start\n\nThe goal of this project being rapid prototyping and development, the project uses Docker (with [Binci](https://github.com/binci/binci)) to allow both the application and its database to be run with very little configuration.\n\n**After installing [Docker](https://docs.docker.com/engine/installation/) and [Binci](https://github.com/binci/binci)**, the application can be run with the following command:\n\n```\nbinci install seed start:dev\n```\n\nThe above command will install dependencies, seed the database (see [/scripts/seed.js](/scripts/seed.js)) and start the server in development mode with `nodemon` to reload server changes and hot-reloading on the client. You can access the server at `http://localhost:9999`.\n\n_The client application starts at a login screen. Credentials can be found/modified in [/scripts/seed.js](/scripts/seed.js)_\n\n## Configuration\n\nThe default configuration in [`binci.yml`](binci.yml) includes the following:\n\n### Ports\n\nThe only exposed port is (by default) `9999`. This is exposed on the primary docker container so the application can be accessed at `http://localhost:9999`.\n\n### Authentication\n\nThe following environment variables are used by the server for authentication purposes:\n\n* `AUTH_PASSWORD_SALT`: Unique salt with which the password for users is hashed using argon2\n* `AUTH_JWT_SECRET`: Secret used when encoding the JSON Web Tokens\n* `AUTH_JWT_EXPIRES`: Expiration time for JSON Web Tokens (default `86400000` or 24 hours)\n\n### API\n\nConfiguration guide for the API (and setting up additional routes, models and controllers) can be found in the [Server Documentation](/server/README.md)\n\n## Commands\n\nThe following commands are available for working with the application.\n\n`binci \u003cCOMMAND\u003e`:\n\n  * `env`: show all environment variables\n  * `shell`: starts container(s) with interactive shell\n  * `build`: builds `client/dist.js` for production runs\n  * `clean`: removes dependencies, data, and generated coverage files\n  * `clean:node_modules` removes `/node_modules`\n  * `clean:jspm_packages`: removes `/client/jspm_packages`\n  * `clean:coverage`: removes `/coverage`\n  * `clean:data`: removes `/data` (MongoDB data volume)\n  * `install`: installs all project dependencies\n  * `lint`: runs full lint task\n  * `lint:client`: runs lint task on client files only\n  * `lint:server`: runs lint task on server files only\n  * `test`: runs linting and full tests (with coverage)\n  * `test:client`: runs tests on client files only\n  * `test:server`: runs tests on server files only\n  * `test:watch`: runs test suite with reload on change\n  * `seed`: runs `scripts/seed` to seed database with data\n  * `start`: starts the application (production)\n  * `start:dev`: starts the application (development)\n  * `upgrade`: runs interactive yarn upgrade\n\n_Note: many of these commands can be run in tandem, for instance, to start a clean (data-free) run of the application in `development` mode, run `binci clean:data start:dev`._\n\n## Installing Dependencies\n\nBecause Binci runs the application in the container dependencies are installed through the container. When the project is run a `.yarn-cache` directory is created in the root of the project to maintain local cache for the project. To install new dependencies within the scope of the containerize application, run:\n\n```\nbinci -e \"yarn add \u003cDEPENDENCY\u003e\"\n```\n\nThis will ensure that the dependency is installed (and built if need-be) inside the container and the `yarn.lock` and `.yarn-cache` are maintained properly.\n\n## Personal Notes\n\nMy goal for this project was two-fold:\n\n1. Give myself an excuse to spend more time in client-side development again, as recently much of my work has been on Node and backend development.\n2. Develop a framework that stopped looking at the front-end and back-end as two incompatible entities; identify, and utilize, the similarities.\n\nSpecifically to latter point; there are inherent differences but I tried to minimize these. The module structure is probably the most significant (primarily due to ReactJS's OOP), however, testing, linting, and general structure of the code _should_ function similarly.\n\nIt often seems that working FE or BE/Node is working in two different paradigms and I do not believe this is, nor needs to be, the case.\n\n## License\n\nThis project is released under the MIT license. Feel free to use, abuse, modify, and so-on.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksafranski%2Fspaq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksafranski%2Fspaq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksafranski%2Fspaq/lists"}