{"id":13683549,"url":"https://github.com/saltyshiomix/ark","last_synced_at":"2025-04-30T13:31:12.101Z","repository":{"id":98853387,"uuid":"161605233","full_name":"saltyshiomix/ark","owner":"saltyshiomix","description":"An easiest authentication system on top of NestJS, TypeORM, NEXT.js(v9.3) and Material UI(v4).","archived":true,"fork":false,"pushed_at":"2021-05-07T10:35:39.000Z","size":1025,"stargazers_count":259,"open_issues_count":2,"forks_count":17,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-02T13:35:40.690Z","etag":null,"topics":["material-ui","nestjs","nextjs","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltyshiomix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["saltyshiomix"]}},"created_at":"2018-12-13T08:08:54.000Z","updated_at":"2024-07-09T12:55:09.000Z","dependencies_parsed_at":"2023-05-25T21:00:29.355Z","dependency_job_id":null,"html_url":"https://github.com/saltyshiomix/ark","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltyshiomix%2Fark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltyshiomix%2Fark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltyshiomix%2Fark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltyshiomix%2Fark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltyshiomix","download_url":"https://codeload.github.com/saltyshiomix/ark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224212232,"owners_count":17274381,"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":["material-ui","nestjs","nextjs","typeorm","typescript"],"created_at":"2024-08-02T13:02:15.215Z","updated_at":"2024-11-12T03:31:24.764Z","avatar_url":"https://github.com/saltyshiomix.png","language":"TypeScript","funding_links":["https://github.com/sponsors/saltyshiomix"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/hTXWo3k.png\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eAn easiest authentication system on top of \u003ca href=\"https://nestjs.com\"\u003eNestJS\u003c/a\u003e, \u003ca href=\"http://typeorm.io\"\u003eTypeORM\u003c/a\u003e, \u003ca href=\"https://nextjs.org\"\u003eNEXT.js (v9)\u003c/a\u003e and \u003ca href=\"https://material-ui.com\"\u003eMaterial UI (v4)\u003c/a\u003e.\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/saltyshiomix/ark.svg\" alt=\"Package License (MIT)\"\u003e\n\u003c/div\u003e\n\n## Features\n\n- Cross platform - Mac, Linux and Windows\n- Database synchronization with entities - powered by [TypeORM](http://typeorm.io)\n- Server Side Rendering - powered by [NEXT.js](https://nextjs.org)\n- API server - powered by [NestJS](https://nestjs.com)\n- Authentication - powered by [Passport](http://www.passportjs.org)\n- [Material UI](https://material-ui.com) design\n\n## Technologies\n\n- Hot reloading for the developer experience :)\n  - [ts-node-dev](https://github.com/whitecolor/ts-node-dev) - Compiles your TS app and restarts when files are modified\n  - [NEXT.js](https://nextjs.org) - The React Framework\n- Lang\n  - [TypeScript](https://www.typescriptlang.org) - Javascript that scales\n- Database\n  - [PostgreSQL](https://www.postgresql.org) - The World's Most Advanced Open Source Relational Database\n- ORM (Object-relational mapping)\n  - [TypeORM](http://typeorm.io) - ORM for TypeScript and JavaScript (ES7, ES6, ES5)\n- Server\n  - [NestJS](https://nestjs.com) - A progressive Node.js framework for building efficient, reliable and scalable server-side applications\n      - internally using [Express](https://expressjs.com) - Fast, unopinionated, minimalist web framework for Node.js\n  - [NEXT.js](https://nextjs.org) - The React Framework\n- Environment variables\n  - [dotenv](https://github.com/motdotla/dotenv) - Loads environment variables from .env for nodejs projects\n  - [dotenv-webpack](https://github.com/mrsteele/dotenv-webpack) - A secure webpack plugin that supports dotenv and other environment variables and only exposes what you choose and use.\n- User authentication\n  - [Passport](http://www.passportjs.org) - Simple, unobtrusive authentication for Node.js\n- UI framework\n  - [React](https://reactjs.org) - A JavaScript library for building user interfaces\n  - [NEXT.js](https://nextjs.org) - The React Framework\n  - [Material UI](https://material-ui.com) - React components that implement Google's Material Design.\n\n## Setup\n\n### Database Setup\n\nArk uses [PostgreSQL](https://www.postgresql.org) **v11**.\n\n#### For Mac Users\n\n```bash\n# install postgresql@11\n$ brew install postgresql@11\n\n# if you want to start postgresql@11 in startup, try do this\n$ brew services start postgresql@11\n\n# [MUST] create user \"arkuser\" with password \"arkpass\"\n$ createuser -P arkuser\n\n# [MUST] create database \"arkdb\" owened by \"arkuser\"\n$ createdb arkdb -O arkuser\n```\n\n#### For Windows Users\n\n##### Python\n\nBecause Ark uses [node.bcrypt.js](https://github.com/kelektiv/node.bcrypt.js), we need a Python:\n\n- Download an installer at \u003chttps://www.python.org/downloads/windows\u003e\n- Install with \"Add Python 3.X to PATH\" checked\n\n##### [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools)\n\n- Run `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe **as Administrator**\n\n##### PostgreSQL\n\n- Download an installer at \u003chttps://www.postgresql.org/download/windows\u003e (**v11**)\n- Run the installer with a flag `--install_runtimes 0` like this:\n\n```cmd\n\u003e postgresql-11.6-3-windows-x64.exe --install_runtimes 0\n```\n\n##### pgAdmin\n\n- Download a latest installer at \u003chttps://www.pgadmin.org/download\u003e\n- Run the pgAdmin and login with a root user\n- Right click `Login/Group Roles` and `Create \u003e Login/Group Role`\n    - `General` Panel:\n        - `Name`: `arkuser`\n    - `Definition` Panel:\n        - `Password`: `arkpass`\n    - `Priviledges` Panel:\n        - Check all `Yes`\n- Right click `Databases` and `Create \u003e Database`\n    - `General` Tab:\n        - `Database`: `arkdb`\n        - `Owner`: `arkuser`\n\n### Application Setup\n\n```bash\n# prepare `.env` and edit it for your own environments\n$ cp .env.example .env\n\n# install dependencies\n$ yarn\n\n# development mode\n$ yarn dev\n\n# production mode\n$ yarn build\n$ yarn start\n```\n\nThe `.env` file is like this:\n\n```\nDB_HOST=localhost\nDB_PORT=5432\nDB_USERNAME=arkuser\nDB_PASSWORD=arkpass\nDB_DATABASE=arkdb\nDB_SYNCHRONIZE=true\n\nAPP_PROTOCOL=http\nAPP_HOST=localhost\nAPP_PORT=4000\nAPP_SESSION_SECRET=ark\n```\n\n## Production Deployment\n\nWith production usages, please use [pm2](https://github.com/Unitech/pm2) for Node.js process managements.\n\n```bash\n# install pm2\n$ npm install --global pm2\n\n# run the app \"ARK\" with the config `ecosystem.config.js`\n$ cd ark\n$ pm2 start\n```\n\nThe example `ecosystem.config.js`:\n\n```js\nmodule.exports = {\n  apps : [{\n    name: 'ARK',\n    script: '.next/production-server/main.js',\n    instances: 1,\n    autorestart: true,\n    watch: false,\n    max_memory_restart: '1G',\n    env: {\n      NODE_ENV: 'production'\n    }\n  }]\n};\n```\n\n## Screenshots\n\n### Register Page\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/hTXWo3k.png\"\u003e\u003c/p\u003e\n\n### Login Page\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/hxoJvmJ.png\"\u003e\u003c/p\u003e\n\n### Top Page (Auth Guard)\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/ym0XlJR.png\"\u003e\u003c/p\u003e\n\n## Articles\n\n- [A road to the easiest user authentication system for Node.js](https://dev.to/saltyshiomix/a-road-to-the-easiest-user-authentication-system-for-nodejs-138f)\n\n## Related\n\n- [YARK](https://github.com/saltyshiomix/yark) - Yet another easiest authentication system on top of NestJS, TypeORM, react-ssr and Material UI(v4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltyshiomix%2Fark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltyshiomix%2Fark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltyshiomix%2Fark/lists"}