├── .prettierignore ├── packages ├── yonode │ ├── .gitignore │ └── src │ │ ├── lib │ │ ├── programOptions.js │ │ └── prompt │ │ │ ├── auth.js │ │ │ └── db.js │ │ └── orm │ │ ├── orm.js │ │ └── mongoDB.js └── yonode-templates │ ├── JS-NoDB-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ └── initialConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ └── routes │ │ │ └── helloWorldRoutes.js │ ├── .gitignore │ ├── Dockerfile │ ├── docker-compose.yaml │ ├── package.json │ └── README.md │ ├── JS-MongoDB-TypeORM-Auth-Template │ ├── src │ │ ├── utils │ │ │ ├── utils.js │ │ │ └── passwordUtils.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── entity │ │ │ └── User.js │ │ └── routes │ │ │ └── authRoutes.js │ ├── Dockerfile │ ├── README.md │ ├── .gitignore │ └── package.json │ ├── JS-MySQL-TypeORM-Auth-Template │ ├── src │ │ ├── utils │ │ │ ├── utils.js │ │ │ └── passwordUtils.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── entity │ │ │ └── User.js │ │ └── routes │ │ │ └── authRoutes.js │ ├── Dockerfile │ ├── README.md │ ├── .gitignore │ └── package.json │ ├── JS-MySQL-TypeORM-NoAuth-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── routes │ │ │ └── helloWorldRoutes.js │ │ ├── entity │ │ │ └── entity.js │ │ └── controllers │ │ │ └── helloWorldController.js │ ├── Dockerfile │ ├── README.md │ └── .gitignore │ ├── typescript │ ├── MongoDB │ │ ├── Prisma │ │ │ ├── Noauth │ │ │ │ ├── src │ │ │ │ │ ├── utils │ │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── middlewares │ │ │ │ │ │ └── middleware.ts │ │ │ │ │ ├── routes │ │ │ │ │ │ └── router.ts │ │ │ │ │ ├── config │ │ │ │ │ │ └── initial.config.ts │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── controller.ts │ │ │ │ │ └── app.ts │ │ │ │ ├── .gitignore │ │ │ │ ├── dist │ │ │ │ │ ├── utils │ │ │ │ │ │ ├── utils.js │ │ │ │ │ │ └── utils.js.map │ │ │ │ │ ├── middlewares │ │ │ │ │ │ ├── middleware.js │ │ │ │ │ │ └── middleware.js.map │ │ │ │ │ ├── routes │ │ │ │ │ │ ├── router.js │ │ │ │ │ │ └── router.js.map │ │ │ │ │ ├── controllers │ │ │ │ │ │ ├── controller.js │ │ │ │ │ │ └── controller.js.map │ │ │ │ │ ├── config │ │ │ │ │ │ ├── initial.config.js │ │ │ │ │ │ └── initial.config.js.map │ │ │ │ │ ├── app.js │ │ │ │ │ └── app.js.map │ │ │ │ ├── tsconfig.json │ │ │ │ └── prisma │ │ │ │ │ └── schema.prisma │ │ │ └── Auth │ │ │ │ ├── .gitignore │ │ │ │ ├── src │ │ │ │ ├── config │ │ │ │ │ └── initial.config.js │ │ │ │ ├── prisma │ │ │ │ │ └── schema.prisma │ │ │ │ └── app.js │ │ │ │ └── package.json │ │ ├── Mongoose │ │ │ └── NoAuth │ │ │ │ ├── src │ │ │ │ ├── utils │ │ │ │ │ └── utils.ts │ │ │ │ ├── middlewares │ │ │ │ │ └── middleware.ts │ │ │ │ ├── routes │ │ │ │ │ └── router.ts │ │ │ │ ├── controllers │ │ │ │ │ └── controller.ts │ │ │ │ ├── config │ │ │ │ │ ├── initial.config.ts │ │ │ │ │ └── db.config.ts │ │ │ │ ├── models │ │ │ │ │ └── model.ts │ │ │ │ └── app.ts │ │ │ │ ├── .gitignore │ │ │ │ ├── tsconfig.json │ │ │ │ └── README.md │ │ └── TypeORM │ │ │ ├── noAuth │ │ │ ├── src │ │ │ │ ├── middleware │ │ │ │ │ └── middleware.ts │ │ │ │ ├── routes │ │ │ │ │ └── route.ts │ │ │ │ ├── entity │ │ │ │ │ └── Entity.ts │ │ │ │ ├── controller │ │ │ │ │ └── controller.ts │ │ │ │ ├── config │ │ │ │ │ ├── initial.config.ts │ │ │ │ │ └── db.config.ts │ │ │ │ └── app.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ └── README.md │ │ │ └── Auth │ │ │ ├── README.md │ │ │ ├── .gitignore │ │ │ └── src │ │ │ ├── utils │ │ │ └── generations.js │ │ │ ├── routes │ │ │ └── user.router.js │ │ │ └── config │ │ │ ├── initial.config.js │ │ │ └── db.config.js │ ├── MySQL │ │ ├── Sequelize │ │ │ └── NoAuth │ │ │ │ ├── src │ │ │ │ ├── utils │ │ │ │ │ └── utils.ts │ │ │ │ ├── middlewares │ │ │ │ │ └── middleware.ts │ │ │ │ ├── routes │ │ │ │ │ └── router.ts │ │ │ │ ├── models │ │ │ │ │ ├── models.ts │ │ │ │ │ └── model.ts │ │ │ │ ├── controllers │ │ │ │ │ └── controller.ts │ │ │ │ ├── config │ │ │ │ │ ├── initial.config.ts │ │ │ │ │ └── db.config.ts │ │ │ │ └── app.ts │ │ │ │ ├── .gitignore │ │ │ │ ├── tsconfig.json │ │ │ │ └── README.md │ │ ├── prisma │ │ │ └── Noauth │ │ │ │ ├── src │ │ │ │ ├── utils │ │ │ │ │ └── utils.ts │ │ │ │ ├── middlewares │ │ │ │ │ └── middleware.ts │ │ │ │ ├── routes │ │ │ │ │ └── router.ts │ │ │ │ ├── config │ │ │ │ │ └── initial.config.ts │ │ │ │ ├── controllers │ │ │ │ │ └── controller.ts │ │ │ │ └── app.ts │ │ │ │ ├── .gitignore │ │ │ │ ├── tsconfig.json │ │ │ │ ├── prisma │ │ │ │ └── schema.prisma │ │ │ │ └── README.md │ │ └── TypeOrm │ │ │ └── noAuth │ │ │ ├── src │ │ │ ├── middleware │ │ │ │ └── middleware.ts │ │ │ ├── routes │ │ │ │ └── route.ts │ │ │ ├── entity │ │ │ │ └── Entity.ts │ │ │ ├── controller │ │ │ │ └── controller.ts │ │ │ ├── config │ │ │ │ ├── initial.config.ts │ │ │ │ └── db.config.ts │ │ │ └── app.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ └── README.md │ └── PostgreSQL │ │ ├── Prisma │ │ └── Noauth │ │ │ ├── src │ │ │ ├── utils │ │ │ │ └── utils.ts │ │ │ ├── middlewares │ │ │ │ └── middleware.ts │ │ │ ├── routes │ │ │ │ └── router.ts │ │ │ ├── config │ │ │ │ └── initial.config.ts │ │ │ ├── controllers │ │ │ │ └── controller.ts │ │ │ └── app.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ ├── prisma │ │ │ ├── client.js │ │ │ └── schema.prisma │ │ │ └── README.md │ │ ├── Sequelize │ │ └── NoAuth │ │ │ ├── src │ │ │ ├── utils │ │ │ │ └── utils.ts │ │ │ ├── middlewares │ │ │ │ └── middleware.ts │ │ │ ├── models │ │ │ │ ├── models.ts │ │ │ │ └── model.ts │ │ │ ├── routes │ │ │ │ └── router.ts │ │ │ ├── controllers │ │ │ │ └── controller.ts │ │ │ ├── config │ │ │ │ ├── initial.config.ts │ │ │ │ └── db.config.ts │ │ │ └── app.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ └── README.md │ │ └── TypeOrm │ │ └── noAuth │ │ ├── src │ │ ├── middleware │ │ │ └── middleware.ts │ │ ├── routes │ │ │ └── route.ts │ │ ├── entity │ │ │ └── Entity.ts │ │ ├── controller │ │ │ └── controller.ts │ │ ├── config │ │ │ ├── initial.config.ts │ │ │ └── db.config.ts │ │ └── app.ts │ │ ├── .gitignore │ │ ├── tsconfig.json │ │ └── README.md │ ├── JS-MongoDB-Mongoose-NoAuth-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── models │ │ │ └── model.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ └── routes │ │ │ └── helloWorldRoutes.js │ ├── Dockerfile │ ├── README.md │ ├── package.json │ └── .gitignore │ ├── JS-MongoDB-TypeORM-NoAuth-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── routes │ │ │ └── helloWorldRoutes.js │ │ ├── entity │ │ │ └── entity.js │ │ └── controllers │ │ │ └── helloWorldController.js │ ├── Dockerfile │ ├── README.md │ └── .gitignore │ ├── JS-MySQL-Sequelize-NoAuth-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── models │ │ │ ├── models.js │ │ │ └── model.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ └── routes │ │ │ └── helloWorldRoutes.js │ ├── Dockerfile │ ├── README.md │ └── .gitignore │ ├── JS-PostgreSQL-TypeORM-NoAuth-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ ├── routes │ │ │ └── helloWorldRoutes.js │ │ └── entity │ │ │ └── entity.js │ ├── Dockerfile │ ├── README.md │ ├── docker-compose.yaml │ └── .gitignore │ ├── JS-MySQL-Prisma-NoAuth-Template │ ├── src │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ └── initialConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ └── routes │ │ │ └── helloWorldRoutes.js │ ├── Dockerfile │ ├── prisma │ │ ├── client.js │ │ └── schema.prisma │ ├── README.md │ ├── docker-compose.yaml │ └── .gitignore │ ├── JS-PostgreSQL-Sequelize-NoAuth-Template │ ├── src │ │ ├── utils │ │ │ └── utils.js │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── models │ │ │ ├── models.js │ │ │ └── model.js │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── routes │ │ │ └── helloWorldRoutes.js │ │ └── controllers │ │ │ └── helloWorldController.js │ ├── Dockerfile │ ├── README.md │ ├── docker-compose.yaml │ └── .gitignore │ ├── JS-MongoDB-Prisma-NoAuth-Template │ ├── src │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ └── initialConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ └── routes │ │ │ └── helloWorldRoutes.js │ ├── Dockerfile │ ├── prisma │ │ ├── client.js │ │ └── schema.prisma │ ├── README.md │ └── .gitignore │ ├── JS-PostgreSQL-Prisma-NoAuth-Template │ ├── src │ │ ├── middlewares │ │ │ └── middleware.js │ │ ├── config │ │ │ └── initialConfig.js │ │ ├── controllers │ │ │ └── helloWorldController.js │ │ └── routes │ │ │ └── helloWorldRoutes.js │ ├── Dockerfile │ ├── prisma │ │ ├── client.js │ │ └── schema.prisma │ ├── README.md │ ├── docker-compose.yaml │ └── .gitignore │ ├── JS-MySQL-Sequelize-Auth-Template │ ├── src │ │ ├── models │ │ │ ├── models.js │ │ │ └── User.js │ │ ├── config │ │ │ ├── initailConfig.js │ │ │ └── dbConfig.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ └── utils │ │ │ └── passwordUtils.js │ ├── Dockerfile │ ├── README.md │ └── .gitIgnore │ ├── JS-PostgreSQL-Sequelize-Auth-Template │ ├── src │ │ ├── models │ │ │ ├── models.js │ │ │ └── User.js │ │ ├── config │ │ │ └── initialConfig.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ └── utils │ │ │ └── passwordUtils.js │ ├── Dockerfile │ ├── README.md │ ├── .gitignore │ └── docker-compose.yaml │ ├── JS-MongoDB-Mongoose-Auth-Template │ ├── Dockerfile │ ├── src │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── models │ │ │ └── User.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ └── utils │ │ │ └── passwordUtils.js │ ├── README.md │ ├── package.json │ ├── .gitignore │ └── docker-compose.yaml │ ├── JS-PostgreSQL-TypeORM-Auth-Template │ ├── Dockerfile │ ├── src │ │ ├── config │ │ │ ├── initialConfig.js │ │ │ └── dbConfig.js │ │ ├── entity │ │ │ └── User.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ └── utils │ │ │ └── passwordUtils.js │ ├── README.md │ ├── .gitignore │ ├── docker-compose.yaml │ └── package.json │ ├── JS-MongoDB-Prisma-Auth-Template │ ├── Dockerfile │ ├── src │ │ ├── config │ │ │ └── initialConfig.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ └── utils │ │ │ └── passwordUtils.js │ ├── prisma │ │ ├── client.js │ │ └── schema.prisma │ ├── README.md │ ├── .gitignore │ └── package.json │ ├── JS-MySQL-Prisma-Auth-Template │ ├── Dockerfile │ ├── src │ │ ├── config │ │ │ └── initailConfig.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ └── utils │ │ │ └── passwordUtils.js │ ├── prisma │ │ ├── client.js │ │ └── schema.prisma │ ├── README.md │ ├── docker-compose.yaml │ ├── .gitignore │ └── package.json │ └── JS-PostgreSQL-Prisma-Auth-Template │ ├── Dockerfile │ ├── src │ ├── config │ │ └── initialConfig.js │ ├── routes │ │ └── authRoutes.js │ └── utils │ │ └── passwordUtils.js │ ├── prisma │ ├── client.js │ └── schema.prisma │ ├── docker-compose.yaml │ ├── .gitignore │ └── README.md ├── .eslintignore ├── yonode.org ├── components │ ├── faq │ │ └── index.ts │ ├── hero │ │ └── index.ts │ ├── seo │ │ ├── index.ts │ │ └── seo.tsx │ ├── layout │ │ ├── index.ts │ │ └── theme-toggle.tsx │ ├── features │ │ └── index.ts │ ├── nav-link │ │ ├── index.ts │ │ └── nav-link.tsx │ ├── button-link │ │ ├── index.ts │ │ └── button-link.tsx │ ├── highlights │ │ └── index.ts │ ├── mobile-nav │ │ └── index.ts │ ├── announcement-banner │ │ └── index.ts │ ├── section │ │ ├── index.ts │ │ └── section.tsx │ ├── testimonials │ │ ├── index.ts │ │ └── testimonials.tsx │ ├── logos │ │ └── index.ts │ ├── motion │ │ ├── box.tsx │ │ ├── page-transition.tsx │ │ ├── fall-in-place.tsx │ │ └── float.tsx │ └── typography │ │ └── index.tsx ├── README.md ├── public │ └── static │ │ ├── images │ │ ├── avatar.jpg │ │ ├── avatar2.jpg │ │ ├── avatar3.jpg │ │ └── eelco.jpg │ │ ├── favicons │ │ ├── favicon.ico │ │ ├── apple-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── ms-icon-144x144.png │ │ ├── ms-icon-150x150.png │ │ ├── ms-icon-310x310.png │ │ ├── ms-icon-70x70.png │ │ ├── apple-icon-57x57.png │ │ ├── apple-icon-60x60.png │ │ ├── apple-icon-72x72.png │ │ ├── apple-icon-76x76.png │ │ ├── android-icon-144x144.png │ │ ├── android-icon-192x192.png │ │ ├── android-icon-36x36.png │ │ ├── android-icon-48x48.png │ │ ├── android-icon-72x72.png │ │ ├── android-icon-96x96.png │ │ ├── apple-icon-114x114.png │ │ ├── apple-icon-120x120.png │ │ ├── apple-icon-144x144.png │ │ ├── apple-icon-152x152.png │ │ ├── apple-icon-180x180.png │ │ ├── apple-icon-precomposed.png │ │ └── browserconfig.xml │ │ └── screenshots │ │ ├── demo.png │ │ ├── list.png │ │ ├── billing.png │ │ ├── dashboard.png │ │ └── landingspage.png ├── .eslintrc.json ├── next-env.d.ts ├── data │ └── logo.tsx ├── theme │ ├── components │ │ ├── index.ts │ │ ├── section.ts │ │ ├── button.ts │ │ └── cta.ts │ ├── foundations │ │ └── typography.ts │ └── index.ts ├── pages │ ├── api │ │ └── hello.ts │ └── _app.tsx ├── .gitignore ├── hooks │ └── use-route-changed.ts └── contentlayer.config.ts ├── docs.yonode.org ├── .gitignore ├── README.md ├── .github │ └── images │ │ ├── orm.png │ │ ├── auth.png │ │ ├── name.png │ │ ├── congrats.png │ │ ├── database.png │ │ ├── language.png │ │ └── installation.png ├── pages │ ├── about.mdx │ └── _meta.json ├── next.config.js ├── next-env.d.ts ├── tsconfig.json └── package.json ├── assets └── yonode-icon.png ├── pnpm-workspace.yaml ├── .prettierrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ └── publish.yaml ├── eslint.config.mjs ├── .gitignore ├── SECURITY.md ├── .eslintrc.js ├── renovate.json5 └── package.json /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | -------------------------------------------------------------------------------- /packages/yonode/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | build 4 | temp 5 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yonode.org/components/faq/index.ts: -------------------------------------------------------------------------------- 1 | export * from './faq' 2 | -------------------------------------------------------------------------------- /yonode.org/components/hero/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hero' 2 | -------------------------------------------------------------------------------- /yonode.org/components/seo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './seo' 2 | -------------------------------------------------------------------------------- /docs.yonode.org/.gitignore: -------------------------------------------------------------------------------- 1 | .next 2 | node_modules 3 | .vscode 4 | -------------------------------------------------------------------------------- /yonode.org/components/layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './layout' 2 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yonode.org/components/features/index.ts: -------------------------------------------------------------------------------- 1 | export * from './features' 2 | -------------------------------------------------------------------------------- /yonode.org/components/nav-link/index.ts: -------------------------------------------------------------------------------- 1 | export * from './nav-link' 2 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-Auth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yonode.org/components/button-link/index.ts: -------------------------------------------------------------------------------- 1 | export * from './button-link' 2 | -------------------------------------------------------------------------------- /yonode.org/components/highlights/index.ts: -------------------------------------------------------------------------------- 1 | export * from './highlights' 2 | -------------------------------------------------------------------------------- /yonode.org/components/mobile-nav/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mobile-nav' 2 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/src/middlewares/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/middleware/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/middleware/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/src/middlewares/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yonode.org/README.md: -------------------------------------------------------------------------------- 1 | # Yonode 2 | 3 | The Node.js Toolkit for Rapid Development 4 | -------------------------------------------------------------------------------- /docs.yonode.org/README.md: -------------------------------------------------------------------------------- 1 | # Yonode 2 | 3 | The Node.js Toolkit for Rapid Development 4 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | /node_modules 3 | .env 4 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/middlewares/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Auth/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | .env -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/Auth/README.md: -------------------------------------------------------------------------------- 1 | new one first time 2 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/middlewares/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/middlewares/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/middleware/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yonode.org/components/announcement-banner/index.ts: -------------------------------------------------------------------------------- 1 | export * from './announcement-banner' 2 | -------------------------------------------------------------------------------- /assets/yonode-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/assets/yonode-icon.png -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-Auth-Template/src/models/models.js: -------------------------------------------------------------------------------- 1 | import "./User.js"; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/middlewares/middleware.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | - 'yonode.org' 4 | - 'docs.yonode.org' -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-Auth-Template/src/models/models.js: -------------------------------------------------------------------------------- 1 | import "./User.js"; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | .env 3 | /dist -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | dest 4 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | dist 4 | -------------------------------------------------------------------------------- /yonode.org/components/section/index.ts: -------------------------------------------------------------------------------- 1 | export * from './section' 2 | export * from './section-title' 3 | -------------------------------------------------------------------------------- /yonode.org/components/testimonials/index.ts: -------------------------------------------------------------------------------- 1 | export * from './testimonial' 2 | export * from './testimonials' 3 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | .vscode/* 4 | /dist -------------------------------------------------------------------------------- /yonode.org/components/logos/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chakra' 2 | export * from './next' 3 | export * from './react' 4 | -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/orm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/orm.png -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/utils/utils.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | .vscode/* 4 | /dist 5 | -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/auth.png -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/name.png -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/congrats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/congrats.png -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/database.png -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/language.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/language.png -------------------------------------------------------------------------------- /yonode.org/public/static/images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/images/avatar.jpg -------------------------------------------------------------------------------- /yonode.org/public/static/images/avatar2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/images/avatar2.jpg -------------------------------------------------------------------------------- /yonode.org/public/static/images/avatar3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/images/avatar3.jpg -------------------------------------------------------------------------------- /yonode.org/public/static/images/eelco.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/images/eelco.jpg -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/middlewares/middleware.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | //# sourceMappingURL=middleware.js.map -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/favicon.ico -------------------------------------------------------------------------------- /yonode.org/public/static/screenshots/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/screenshots/demo.png -------------------------------------------------------------------------------- /yonode.org/public/static/screenshots/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/screenshots/list.png -------------------------------------------------------------------------------- /docs.yonode.org/.github/images/installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/docs.yonode.org/.github/images/installation.png -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/Auth/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ 7 | .env -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ 7 | .env -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ 7 | .env -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon.png -------------------------------------------------------------------------------- /yonode.org/public/static/screenshots/billing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/screenshots/billing.png -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ 7 | .env -------------------------------------------------------------------------------- /yonode.org/public/static/screenshots/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/screenshots/dashboard.png -------------------------------------------------------------------------------- /yonode.org/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals", 3 | "rules": { 4 | "import/no-anonymous-default-export": "off" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/favicon-96x96.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/ms-icon-144x144.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/ms-icon-150x150.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/ms-icon-310x310.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/ms-icon-70x70.png -------------------------------------------------------------------------------- /yonode.org/public/static/screenshots/landingspage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/screenshots/landingspage.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "trailingComma": "es5", 5 | "tabWidth": 2, 6 | "printWidth": 80 7 | } 8 | -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-57x57.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-60x60.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-72x72.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-76x76.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/android-icon-144x144.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/android-icon-192x192.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/android-icon-36x36.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/android-icon-48x48.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/android-icon-72x72.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/android-icon-96x96.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-114x114.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-120x120.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-144x144.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-152x152.png -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-180x180.png -------------------------------------------------------------------------------- /docs.yonode.org/pages/about.mdx: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | Yonode is a Node.js framework that streamlines your workflow, enabling you to craft efficient server solutions rapidly. 4 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | .vscode/* 5 | /dist 6 | -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sharafdin/yonode/HEAD/yonode.org/public/static/favicons/apple-icon-precomposed.png -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Auth/src/config/initial.config.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | dotenv.config(); 3 | 4 | export const port = process.env.PORT || 5000; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/utils/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/routes/route.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/routes/route.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /docs.yonode.org/next.config.js: -------------------------------------------------------------------------------- 1 | const withNextra = require('nextra')({ 2 | theme: 'nextra-theme-docs', 3 | themeConfig: './theme.config.tsx', 4 | }) 5 | 6 | module.exports = withNextra() 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/models/models.js: -------------------------------------------------------------------------------- 1 | import modelName from "./model.js"; 2 | 3 | const models = { 4 | modelName 5 | } 6 | 7 | export default models; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/models/models.ts: -------------------------------------------------------------------------------- 1 | import modelName from "./model"; 2 | 3 | const models = { 4 | modelName 5 | } 6 | 7 | export default models; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/routes/route.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | 3 | const routerName = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/models/models.js: -------------------------------------------------------------------------------- 1 | import modelName from './model.js' 2 | 3 | const models = { 4 | modelName 5 | } 6 | 7 | export default models; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/models/models.ts: -------------------------------------------------------------------------------- 1 | import modelName from "./model"; 2 | 3 | const models = { 4 | modelName 5 | } 6 | 7 | export default models; -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import express, { Router } from "express"; 2 | 3 | const routerName:Router = express.Router(); 4 | 5 | export default routerName; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/middlewares/middleware.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/middlewares/middleware.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/routes/router.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | const routerName = express.Router(); 3 | export default routerName; 4 | //# sourceMappingURL=router.js.map -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/models/model.js: -------------------------------------------------------------------------------- 1 | import sequelize from "../config/dbConfig.js"; 2 | 3 | const modelName = sequelize.define('modelName', { 4 | 5 | }); 6 | 7 | export default modelName; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/controllers/controller.js: -------------------------------------------------------------------------------- 1 | export const controller = async (req, res) => { 2 | try { 3 | } 4 | catch (error) { } 5 | }; 6 | //# sourceMappingURL=controller.js.map -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/config/initial.config.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | dotenv.config(); 3 | export const port = process.env.SERVER_PORT || 8000; 4 | //# sourceMappingURL=initial.config.js.map -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/Auth/src/utils/generations.js: -------------------------------------------------------------------------------- 1 | export const generateVerificationToken = () => { 2 | return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); 3 | }; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/entity/Entity.ts: -------------------------------------------------------------------------------- 1 | import { Entity, ObjectIdColumn, ObjectId } from "typeorm"; 2 | 3 | @Entity() 4 | export class EntityName { 5 | @ObjectIdColumn() 6 | _id: ObjectId; 7 | } 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/entity/Entity.ts: -------------------------------------------------------------------------------- 1 | import { Entity, PrimaryGeneratedColumn } from "typeorm"; 2 | 3 | @Entity() 4 | export class EntityName { 5 | @PrimaryGeneratedColumn() 6 | id: number; 7 | } 8 | -------------------------------------------------------------------------------- /yonode.org/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /docs.yonode.org/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/entity/Entity.ts: -------------------------------------------------------------------------------- 1 | import { Entity, PrimaryGeneratedColumn } from "typeorm"; 2 | 3 | @Entity() 4 | export class EntityName { 5 | @PrimaryGeneratedColumn() 6 | id: number; 7 | } 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/src/controllers/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/controller/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/controller/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/src/controllers/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/controllers/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/controllers/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/controller/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | } catch (error) {} 6 | }; 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Questions & Discussions 4 | url: https://github.com/sharafdin/yonode/discussions 5 | about: Use GitHub discussions for message-board style questions and discussions. 6 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/controllers/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | 6 | } catch (error) { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /yonode.org/data/logo.tsx: -------------------------------------------------------------------------------- 1 | import { chakra, HTMLChakraProps, useColorModeValue } from '@chakra-ui/react' 2 | 3 | export const Logo: React.FC> = (props) => { 4 | const color = useColorModeValue('#231f20', '#fff') 5 | return ( 6 |

Yonode

7 | ) 8 | } 9 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/routes/router.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/routes/router.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AAEpC,eAAe,UAAU,CAAC"} -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || "yonodeDB" -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/controllers/controller.ts: -------------------------------------------------------------------------------- 1 | import { Request , Response } from "express"; 2 | 3 | export const controller = async (req: Request, res: Response) => { 4 | try { 5 | 6 | } catch (error) { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || 'yonodeDB'; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | 3 | services: 4 | server: 5 | build: . 6 | container_name: server 7 | restart: on-failure 8 | volumes: 9 | - .:/app 10 | - /app/node_modules 11 | ports: 12 | - '8000:8000' -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/models/model.js: -------------------------------------------------------------------------------- 1 | import { sequelize } from '../config/dbConfig.js'; 2 | 3 | const modelName = sequelize.define('modelName', { 4 | // rest of your schema here 5 | 6 | }); 7 | 8 | export default modelName; 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || 'yonodeDB'; 7 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || "yonodeDB"; 7 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | import tseslint from "typescript-eslint"; 4 | 5 | 6 | export default [ 7 | {languageOptions: { globals: globals.browser }}, 8 | pluginJs.configs.recommended, 9 | ...tseslint.configs.recommended, 10 | ]; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/src/models/model.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const { Schema, model } = mongoose; 4 | 5 | const schemaName = new Schema({ 6 | 7 | }); 8 | 9 | const modelName = model("modelName", schemaName); 10 | 11 | export default modelName; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res) => { 2 | try { 3 | res.send("Hello World!"); 4 | } catch (error) { 5 | res.status(500).json({ 6 | message: "Internal Server Error", 7 | }); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-NoDB-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { helloWorld } from "../controllers/helloWorldController.js"; 3 | 4 | const helloWorldRouter = express.Router(); 5 | 6 | helloWorldRouter.get("/", helloWorld); 7 | 8 | export default helloWorldRouter; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res)=>{ 2 | try{ 3 | res.send("Hello world!") 4 | } 5 | catch(err){ 6 | res.status(500).json({ 7 | message: "Internal Server Error" 8 | }) 9 | } 10 | } -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res) => { 2 | try { 3 | res.send("Hello World!"); 4 | } catch (error) { 5 | res.status(500).json({ 6 | message: "Internal Server Error", 7 | }); 8 | } 9 | }; -------------------------------------------------------------------------------- /docs.yonode.org/pages/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": "Getting Started", 3 | "about": { 4 | "title": "About", 5 | "type": "page" 6 | }, 7 | "contact": { 8 | "title": "Contact ↗", 9 | "type": "page", 10 | "href": "https://twitter.com/isasharafdin", 11 | "newWindow": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || "yonodeDB"; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || "yonodeDB"; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | RUN npx prisma generate 16 | 17 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | RUN npx prisma generate 16 | 17 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | RUN npx prisma generate 16 | 17 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from 'express' 2 | import { helloWorld } from '../controllers/helloWorldController.js' 3 | 4 | const helloWorldRouter = express.Router() 5 | 6 | helloWorldRouter.get("/", helloWorld) 7 | 8 | export default helloWorldRouter; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from 'express' 2 | import { helloWorld } from '../controllers/helloWorldController.js' 3 | 4 | const helloWorldRouter = express.Router() 5 | 6 | helloWorldRouter.get("/", helloWorld) 7 | 8 | export default helloWorldRouter; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/config/initial.config.ts: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || "yonodeDB"; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res) => { 2 | try { 3 | res.send("Hello World!"); 4 | } catch (error) { 5 | res.status(500).json({ 6 | message: "Internal Server Error", 7 | }); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { helloWorld } from "../controllers/helloWorldController.js"; 3 | 4 | const helloWorldRouter = express.Router(); 5 | 6 | helloWorldRouter.get("/", helloWorld); 7 | 8 | export default helloWorldRouter; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const jwtSecret = process.env.JWT_SECRET_KEY; 7 | export const nodeEnv = process.env.NODE_ENVIRONMENT || "development"; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | RUN npx prisma generate 16 | 17 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res) => { 2 | try { 3 | res.send("Hello World!"); 4 | } catch (error) { 5 | res.status(500).json({ 6 | message: "Internal Server Error", 7 | }); 8 | } 9 | }; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from 'express' 2 | import { helloWorld } from '../controllers/helloWorldController.js'; 3 | 4 | const helloWorldRouter = express.Router() 5 | 6 | helloWorldRouter.get("/" , helloWorld) 7 | 8 | export default helloWorldRouter; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-Auth-Template/src/config/initailConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const jwtSecret = process.env.JWT_SECRET_KEY; 7 | export const nodeEnv = process.env.NODE_ENVIRONMENT || "development"; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res) => { 2 | try { 3 | res.send("Hello World!"); 4 | } catch (error) { 5 | res.status(500).json({ 6 | message: "Internal Server Error", 7 | }); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-Auth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN npm install -g nodemon 12 | 13 | RUN pnpm install 14 | 15 | RUN npx prisma generate 16 | 17 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | EXPOSE 8000 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install -g pnpm 10 | 11 | RUN pnpm install 12 | 13 | RUN npm install -g nodemon 14 | 15 | RUN npx prisma generate 16 | 17 | CMD ["nodemon", "-L", "./src/app.js"] -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { helloWorld } from "../controllers/helloWorldController.js"; 3 | 4 | const helloWorldRouter = express.Router(); 5 | 6 | helloWorldRouter.get("/", helloWorld); 7 | 8 | export default helloWorldRouter; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | export const helloWorld = async (req, res) => { 2 | try { 3 | res.send("Hello World!"); 4 | } catch (error) { 5 | res.status(500).json({ 6 | message: "Internal Server Error", 7 | }); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /yonode.org/public/static/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { helloWorld } from "../controllers/helloWorldController.js"; 3 | 4 | const helloWorldRouter = express.Router(); 5 | 6 | helloWorldRouter.get("/", helloWorld); 7 | 8 | export default helloWorldRouter; 9 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { helloWorld } from "../controllers/helloWorldController.js"; 3 | 4 | const helloWorldRouter = express.Router(); 5 | 6 | helloWorldRouter.get("/", helloWorld); 7 | 8 | export default helloWorldRouter; 9 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const jwtSecret = process.env.JWT_SECRET_KEY; 7 | export const nodeEnv = process.env.NODE_ENVIRONMENT || "development"; 8 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express" 2 | import { helloWorld } from "../controllers/helloWorldController.js" 3 | 4 | const hellWorldRouter = express.Router() 5 | 6 | hellWorldRouter.get("/" , helloWorld) 7 | 8 | export default hellWorldRouter; 9 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/routes/helloWorldRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { helloWorld } from "../controllers/helloWorldController.js"; 3 | 4 | const helloWorldRouter = express.Router(); 5 | 6 | helloWorldRouter.get("/", helloWorld); 7 | 8 | export default helloWorldRouter; 9 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/config/initial.config.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"initial.config.js","sourceRoot":"","sources":["../../src/config/initial.config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC"} -------------------------------------------------------------------------------- /yonode.org/components/motion/box.tsx: -------------------------------------------------------------------------------- 1 | import { chakra, ChakraProps, HTMLChakraProps } from '@chakra-ui/react' 2 | import { motion, HTMLMotionProps } from 'framer-motion' 3 | 4 | export interface MotionBoxProps 5 | extends HTMLMotionProps<'div'>, 6 | Omit {} 7 | 8 | export const MotionBox = motion(chakra.div) 9 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/controllers/controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/controllers/controller.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IAC9D,IAAI,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC,CAAA,CAAC;AACpB,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2020", 6 | "baseUrl": "src", 7 | "outDir": "./dist", 8 | "sourceMap": true, 9 | "noImplicitAny": true, 10 | }, 11 | "include": ["src/**/*"], 12 | } -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "baseUrl": "src", 6 | "outDir": "./dist", 7 | "sourceMap": true, 8 | "noImplicitAny": true 9 | }, 10 | "include": ["src/**/*"] 11 | } -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "baseUrl": "src", 6 | "outDir": "./dist", 7 | "sourceMap": true, 8 | "noImplicitAny": true 9 | }, 10 | "include": ["src/**/*"] 11 | } -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2020", 6 | "baseUrl": "src", 7 | "outDir": "./dist", 8 | "sourceMap": true, 9 | "noImplicitAny": true, 10 | }, 11 | "include": ["src/**/*"], 12 | } -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Auth/src/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "mongodb" 10 | url = env("DATABASE_URL") 11 | } 12 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "baseUrl": "src", 6 | "outDir": "./dist", 7 | "sourceMap": true, 8 | "noImplicitAny": true 9 | }, 10 | "include": ["src/**/*"] 11 | } -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2020", 6 | "baseUrl": "src", 7 | "outDir": "./dist", 8 | "sourceMap": true, 9 | "noImplicitAny": true 10 | }, 11 | "include": ["src/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/models/model.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | interface typeName { 4 | 5 | } 6 | 7 | const { Schema, model } = mongoose; 8 | 9 | const schemaName = new Schema({ 10 | 11 | }); 12 | 13 | const modelName = model("modelName", schemaName); 14 | 15 | export default modelName; -------------------------------------------------------------------------------- /yonode.org/theme/components/index.ts: -------------------------------------------------------------------------------- 1 | import { default as Button } from './button' 2 | import { default as CTA } from './cta' 3 | import { default as Features, Feature } from './features' 4 | import { default as SectionTitle } from './section-title' 5 | import { default as Section } from './section' 6 | 7 | export default { Button, CTA, Features, Feature, SectionTitle, Section } 8 | -------------------------------------------------------------------------------- /yonode.org/theme/foundations/typography.ts: -------------------------------------------------------------------------------- 1 | export const fontSizes = { 2 | xs: '0.75rem', 3 | sm: '0.8125rem', 4 | md: '0.875rem', 5 | lg: '1', 6 | xl: '1.125rem', 7 | '2xl': '1.25rem', 8 | '3xl': '1.5rem', 9 | '4xl': '1.875rem', 10 | '5xl': '2', 11 | '6xl': '3.5rem', 12 | '7xl': '3rem', 13 | '8xl': '4rem', 14 | '9xl': '5rem', 15 | '10xl': '6rem', 16 | } 17 | -------------------------------------------------------------------------------- /yonode.org/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from 'next' 3 | 4 | type Data = { 5 | name: string 6 | } 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse 11 | ) { 12 | res.status(200).json({ name: 'John Doe' }) 13 | } 14 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/entity/entity.js: -------------------------------------------------------------------------------- 1 | import { EntitySchema } from "typeorm"; 2 | 3 | const schemaName = new EntitySchema({ 4 | name: "schemaName", 5 | tableName: "tableName", 6 | columns: { 7 | id: { 8 | primary: true, 9 | type: "int", 10 | generated: true, 11 | }, 12 | }, 13 | }); 14 | export default schemaName; 15 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/entity/entity.js: -------------------------------------------------------------------------------- 1 | import { EntitySchema } from "typeorm"; 2 | 3 | const schemaName = new EntitySchema({ 4 | name: "schemaName", 5 | tableName: "tableName", 6 | columns: { 7 | id: { 8 | primary: true, 9 | type: "int", 10 | generated: true, 11 | }, 12 | }, 13 | }); 14 | export default schemaName; 15 | -------------------------------------------------------------------------------- /yonode.org/components/motion/page-transition.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { HTMLMotionProps } from 'framer-motion' 3 | 4 | import { MotionBox, MotionBoxProps } from './box' 5 | 6 | export const PageTransition: React.FC = (props) => ( 7 | 12 | ) 13 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/entity/entity.js: -------------------------------------------------------------------------------- 1 | import { EntitySchema } from "typeorm"; 2 | 3 | const SchemaName = new EntitySchema({ 4 | name: "SchemaName", 5 | tableName: "tableName", 6 | columns: { 7 | _id: { 8 | primary: true, 9 | type: "mongodb-object-id", 10 | objectId: true, 11 | }, 12 | }, 13 | }); 14 | export default SchemaName; 15 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/models/model.ts: -------------------------------------------------------------------------------- 1 | import { Model } from "sequelize"; 2 | import sequelize from "../config/db.config"; 3 | 4 | interface modelAttributes { 5 | 6 | } 7 | 8 | interface modelType extends Model , modelAttributes{} 9 | 10 | const modelName = sequelize.define("modelName",{ 11 | 12 | }) 13 | 14 | export default modelName; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-Auth-Template/src/config/initailConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || "yonodeDB"; 7 | export const jwtSecret = process.env.JWT_SECRET_KEY; 8 | export const nodeEnv = process.env.NODE_ENVIRONMENT || 'development'; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | let prisma; 4 | 5 | if (process.env.NODE_ENV === "production") { 6 | prisma = new PrismaClient(); 7 | } else { 8 | if (!globalThis.prisma) { 9 | globalThis.prisma = new PrismaClient(); 10 | } 11 | prisma = globalThis.prisma; 12 | } 13 | 14 | export default prisma; 15 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/models/model.ts: -------------------------------------------------------------------------------- 1 | import { Model } from "sequelize"; 2 | import sequelize from "../config/db.config"; 3 | 4 | interface modelAttributes { 5 | 6 | } 7 | 8 | interface modelType extends Model, modelAttributes{}; 9 | 10 | const modelName = sequelize.define("modelName",{ 11 | 12 | }) 13 | 14 | export default modelName; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | let prisma; 4 | 5 | if (process.env.NODE_ENV === "production") { 6 | prisma = new PrismaClient(); 7 | } else { 8 | 9 | if (!globalThis.prisma) { 10 | globalThis.prisma = new PrismaClient(); 11 | } 12 | prisma = globalThis.prisma; 13 | } 14 | 15 | export default prisma; 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | let prisma; 4 | 5 | if (process.env.NODE_ENV === "production") { 6 | prisma = new PrismaClient(); 7 | } else { 8 | 9 | if (!globalThis.prisma) { 10 | globalThis.prisma = new PrismaClient(); 11 | } 12 | prisma = globalThis.prisma; 13 | } 14 | 15 | export default prisma; 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || "yonodeDB"; 7 | export const jwtSecret = process.env.JWT_SECRET_KEY; 8 | export const nodeEnv = process.env.NODE_ENVIRONMENT || 'development'; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | let prisma; 4 | 5 | if (process.env.NODE_ENV === "production") { 6 | prisma = new PrismaClient(); 7 | } else { 8 | 9 | if (!globalThis.prisma) { 10 | globalThis.prisma = new PrismaClient(); 11 | } 12 | prisma = globalThis.prisma; 13 | } 14 | 15 | export default prisma; 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "mysql" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | model modelName { 14 | id Int @id @default(autoincrement()) 15 | } -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; 8 | export const jwtSecret = process.env.JWT_SECRET_KEY; 9 | export const nodeEnv = process.env.NODE_ENVIRONMENT || 'development'; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "postgresql" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | model modelName { 14 | id Int @id @default(autoincrement()) 15 | } -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2020", 6 | "baseUrl": "src", 7 | "outDir": "./dist", 8 | "sourceMap": true, 9 | "noImplicitAny": true, 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true 12 | }, 13 | "include": ["src/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | import { port } from "config/initial.config"; 4 | 5 | // initializing the app 6 | const app: Express = express(); 7 | app.use(express.json()); 8 | 9 | // rest of your code here 10 | 11 | app.listen(port, () => { 12 | console.log(`Server running on http://localhost:/${port}/`); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2020", 6 | "baseUrl": "src", 7 | "outDir": "./dist", 8 | "sourceMap": true, 9 | "noImplicitAny": true, 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true 12 | }, 13 | "include": ["src/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "target": "ES2020", 6 | "baseUrl": "src", 7 | "outDir": "./dist", 8 | "sourceMap": true, 9 | "noImplicitAny": true, 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true 12 | }, 13 | "include": ["src/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || "yonodeDB"; 8 | export const jwtSecret = process.env.JWT_SECRET_KEY; 9 | export const nodeEnv = process.env.NODE_ENVIRONMENT || "development"; 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || "yonodeDB"; 8 | export const jwtSecret = process.env.JWT_SECRET_KEY; 9 | export const nodeEnv = process.env.NODE_ENVIRONMENT || "development"; 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "postgresql" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | model User { 14 | id Int @id @default(autoincrement()) 15 | 16 | } 17 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | import { nodeEnv } from "../src/config/initialConfig.js"; 3 | 4 | let prisma; 5 | 6 | if (nodeEnv === "production") { 7 | prisma = new PrismaClient(); 8 | } else { 9 | if (!globalThis.prisma) { 10 | globalThis.prisma = new PrismaClient(); 11 | } 12 | prisma = globalThis.prisma; 13 | } 14 | 15 | export default prisma; 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-Auth-Template/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | import { nodeEnv } from "../src/config/initailConfig.js"; 3 | 4 | let prisma; 5 | 6 | if (nodeEnv === "production") { 7 | prisma = new PrismaClient(); 8 | } else { 9 | if (!globalThis.prisma) { 10 | globalThis.prisma = new PrismaClient(); 11 | } 12 | prisma = globalThis.prisma; 13 | } 14 | 15 | export default prisma; 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-Auth-Template/src/config/initialConfig.js: -------------------------------------------------------------------------------- 1 | import dotenv from "dotenv"; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.SERVER_PORT || 8000; 6 | export const dbUrl = process.env.DATABASE_URL; 7 | export const dbName = process.env.DATABASE_NAME || "yonodeDB"; 8 | export const jwtSecret = process.env.JWT_SECRET_KEY; 9 | export const nodeEnv = process.env.NODE_ENVIRONMENT || "development"; 10 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/app.js: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express from "express"; 3 | import { port } from "config/initial.config"; 4 | // import your files 5 | // initializing the app 6 | const app = express(); 7 | app.use(express.json()); 8 | // rest of your code here 9 | app.listen(port, () => { 10 | console.log(`Server running on http://localhost:/${port}/`); 11 | }); 12 | //# sourceMappingURL=app.js.map -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "mongodb" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | model modelName { 14 | id String @id @default(auto()) @map("_id") @db.ObjectId 15 | } 16 | 17 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-Auth-Template/prisma/client.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | import { nodeEnv } from "../src/config/initialConfig.js"; 3 | 4 | let prisma; 5 | 6 | if (nodeEnv === "production") { 7 | prisma = new PrismaClient(); 8 | } else { 9 | if (!globalThis.prisma) { 10 | globalThis.prisma = new PrismaClient(); 11 | } 12 | prisma = globalThis.prisma; 13 | } 14 | 15 | export default prisma; 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Auth/src/app.js: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express from 'express'; 3 | import { port } from './config/initial.config.js'; 4 | import chalk from 'chalk' 5 | // Initializing app 6 | const app = express(); 7 | const PORT = port; 8 | 9 | // rest of your code here 10 | 11 | 12 | 13 | app.listen(PORT, () => { 14 | console.log(`${chalk.blue.bold('Server')} is listening on port ${PORT} 🚀`); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "mongodb" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | model User { 14 | id String @id @default(auto()) @map("_id") @db.ObjectId 15 | 16 | } 17 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/Auth/src/routes/user.router.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { registerUser } from "../controllers/user.controller.js"; 3 | 4 | const userRouter = express.Router(); 5 | 6 | userRouter.post('/register-user', registerUser); 7 | // userRouter.get('/verify-user', verifyUser); 8 | // userRouter.post('/login-user', loginUser); 9 | // userRouter.post('/logout-user', logoutUser); 10 | 11 | export default userRouter; -------------------------------------------------------------------------------- /yonode.org/theme/components/section.ts: -------------------------------------------------------------------------------- 1 | const Section = { 2 | baseStyle: { 3 | pt: 28, 4 | pb: 28, 5 | px: [4, null], 6 | }, 7 | variants: { 8 | subtle: {}, 9 | solid: { 10 | bg: 'primary.400', 11 | }, 12 | alternate: ({ colorMode }: any) => ({ 13 | bg: colorMode === 'dark' ? 'gray.800' : 'gray.50', 14 | }), 15 | }, 16 | defaultProps: { 17 | variant: 'subtle', 18 | }, 19 | } 20 | 21 | export default Section 22 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | 4 | // import your files 5 | import { port } from "./config/initial.config"; 6 | 7 | 8 | // Initializing the app 9 | const app: Express = express(); 10 | app.use(express.json()); 11 | 12 | // rest of your code here 13 | 14 | 15 | app.listen(port, () => { 16 | console.log(`Server running on http://localhost:/${port}`); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/yonode/src/lib/programOptions.js: -------------------------------------------------------------------------------- 1 | import { program } from 'commander' 2 | 3 | import { readFile } from 'fs/promises'; 4 | const pkg = JSON.parse(await readFile(new URL('../../package.json', import.meta.url))); 5 | 6 | program 7 | .option('-v, --version', 'output the version number') 8 | 9 | program.parse(process.argv); 10 | 11 | const options = program.opts(); 12 | 13 | if (options.version) { 14 | console.log(pkg.version); 15 | process.exit(1) 16 | } 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs and Runtime data 2 | logs/ 3 | *.log 4 | 5 | # Dependency directories 6 | node_modules/ 7 | 8 | # TypeScript cache 9 | *.tsbuildinfo 10 | 11 | # Optional cache directories 12 | .eslintcache 13 | .stylelintcache 14 | 15 | # Environment variables 16 | .env 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .env.local 21 | 22 | # Yarn and npm cache 23 | .npm/ 24 | 25 | # Miscellaneous 26 | .node_repl_history 27 | .vscode-test 28 | -------------------------------------------------------------------------------- /yonode.org/components/button-link/button-link.tsx: -------------------------------------------------------------------------------- 1 | import { Button, ButtonProps } from '@chakra-ui/react' 2 | import NextLink, { LinkProps } from 'next/link' 3 | 4 | export type ButtonLinkProps = LinkProps & ButtonProps 5 | 6 | export const ButtonLink: React.FC = ({ 7 | href, 8 | children, 9 | ...props 10 | }) => { 11 | return ( 12 | 13 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | Reporting a Vulnerability 2 | 3 | If you believe you have found a security vulnerability in Yonode, please report it to us responsibly. Do not open a public issue. We will investigate all legitimate reports. Send your report to [security@yonode.org](mailto:security@yonode.org). 4 | 5 | While the discovery of new vulnerabilities is rare, we also recommend always using the latest versions of Yonode and its official plugins to ensure your application remains as secure as possible. 6 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | import { port } from "config/initial.config"; 4 | 5 | // import your files 6 | 7 | 8 | // initializing the app 9 | const app: Express = express(); 10 | app.use(express.json()); 11 | 12 | // rest of your code here 13 | 14 | 15 | 16 | 17 | app.listen(port, () => { 18 | console.log(`Server running on http://localhost:/${port}/`); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/dist/app.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,OAAO,OAAoB,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,oBAAoB;AAGpB,uBAAuB;AACvB,MAAM,GAAG,GAAY,OAAO,EAAE,CAAC;AAC/B,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAExB,yBAAyB;AAKzB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IACpB,OAAO,CAAC,GAAG,CAAC,uCAAuC,IAAI,GAAG,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | 4 | // import your files 5 | import { port } from "./config/initial.config"; 6 | import "./config/db.config"; 7 | 8 | // initializing the app 9 | const app: Express = express(); 10 | app.use(express.json()); 11 | 12 | // rest of your code here 13 | 14 | 15 | app.listen(port, () => { 16 | console.log(`Server running on http://localhost:/${port}/`); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | 2 | export const helloWorld = async (req, res) => { 3 | try { 4 | // Send a simple string as a response 5 | res.send("Hello World!") 6 | } catch (err) { 7 | // If there's an error, send a response with a 500 status code 8 | // and an error message 9 | res.status(500).json({ 10 | message: "Internal Server Error" 11 | }) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | 4 | // import your files 5 | import { port } from "./config/initial.config"; 6 | import "./config/db.config"; 7 | 8 | // initializing the app 9 | const app: Express = express(); 10 | app.use(express.json()); 11 | 12 | // rest of your code here 13 | 14 | 15 | app.listen(port, () => { 16 | console.log(`Server running on http://localhost:/${port}/`); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | 4 | // import your files 5 | import { port } from "./config/initial.config"; 6 | import "./config/db.config"; 7 | 8 | // initializing the app 9 | const app: Express = express(); 10 | app.use(express.json()); 11 | 12 | // rest of your code here 13 | 14 | 15 | app.listen(port, () => { 16 | console.log(`Server running on http://localhost:/${port}/`); 17 | }); 18 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "some-other-config-you-use", 4 | "plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier 5 | ], 6 | plugins: [ 7 | "prettier" // Adds the plugin that integrates Prettier with ESLint 8 | ], 9 | rules: { 10 | "prettier/prettier": "error", // Indicates any deviations from Prettier formatting as ESLint errors 11 | // You can override/add specific rules settings here 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/config/db.config.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import { dbName, dbUrl } from "./initial.config"; 3 | 4 | const connectDB = async (): Promise => { 5 | try { 6 | await mongoose.connect(dbUrl, { 7 | dbName, 8 | }); 9 | console.log("Connected to the database"); 10 | } catch (error) { 11 | console.error("Error connecting to database", error); 12 | process.exit(1); 13 | } 14 | }; 15 | 16 | export default connectDB; 17 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-Auth-Template/src/entity/User.js: -------------------------------------------------------------------------------- 1 | import { EntitySchema } from "typeorm"; 2 | 3 | const User = new EntitySchema({ 4 | name: "User", 5 | tableName: "users", 6 | columns: { 7 | _id: { 8 | primary: true, 9 | type: "int", 10 | generated: true, 11 | }, 12 | email: { 13 | type: "varchar", 14 | unique: true, 15 | }, 16 | password: { 17 | type: "varchar", 18 | required: true, 19 | }, 20 | }, 21 | }); 22 | export default User; 23 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-Auth-Template/src/entity/User.js: -------------------------------------------------------------------------------- 1 | import { EntitySchema } from "typeorm"; 2 | 3 | const User = new EntitySchema({ 4 | name: "User", 5 | tableName: "users", 6 | columns: { 7 | _id: { 8 | primary: true, 9 | type: "int", 10 | generated: true, 11 | }, 12 | email: { 13 | type: "varchar", 14 | unique: true, 15 | }, 16 | password: { 17 | type: "varchar", 18 | required: true, 19 | }, 20 | }, 21 | }); 22 | export default User; 23 | -------------------------------------------------------------------------------- /packages/yonode/src/lib/prompt/auth.js: -------------------------------------------------------------------------------- 1 | import inquirer from "inquirer"; 2 | import { options } from "../../index.js"; 3 | import { authQuestion } from "../questions.js"; 4 | import { repoConditions } from "../repoConditions.js"; 5 | 6 | export const authType = () => { 7 | inquirer 8 | .prompt(authQuestion) 9 | .then((answer) => { 10 | options.auth = answer.auth_type; 11 | repoConditions() 12 | }) 13 | .catch((error) => { 14 | if (error.isTtyError) { 15 | } else { 16 | } 17 | }); 18 | }; 19 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/src/entity/User.js: -------------------------------------------------------------------------------- 1 | import { EntitySchema } from "typeorm"; 2 | 3 | const User = new EntitySchema({ 4 | name: "User", 5 | tableName: "users", 6 | columns: { 7 | _id: { 8 | primary: true, 9 | type: "mongodb-object-id", 10 | objectId: true, 11 | }, 12 | email: { 13 | type: "string", 14 | unique: true, 15 | }, 16 | password: { 17 | type: "string", 18 | required: true, 19 | }, 20 | }, 21 | }); 22 | export default User; 23 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/Auth/src/config/initial.config.js: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | export const port = process.env.PORT || 8000; 6 | export const dbURL = process.env.DATABASE_URL; 7 | export const JWT_Secret = process.env.JWT_SECRET_KEY; 8 | export const Web_Url = process.env.WEB_URL 9 | 10 | // email 11 | export const emailService = process.env.SERVICE 12 | export const emailUser = process.env.USER 13 | export const emailPass = process.env.PASS 14 | export const emailFrom = process.env.FROM -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-Auth-Template/src/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | import { validateUserLogin, validateUserRegister } from '../middlewares/validators/authValidator.js'; 3 | import { loginUser, registerUser } from '../controllers/authController.js'; 4 | 5 | const router = express.Router(); 6 | 7 | // Validate registration input 8 | router.post('/register',validateUserRegister, registerUser); 9 | 10 | // Validate login input 11 | router.post('/login', validateUserLogin,loginUser); 12 | 13 | export default router; 14 | -------------------------------------------------------------------------------- /yonode.org/components/layout/theme-toggle.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, useColorMode } from '@chakra-ui/react' 2 | import { FiMoon, FiSun } from 'react-icons/fi' 3 | 4 | const ThemeToggle = () => { 5 | const { colorMode, toggleColorMode } = useColorMode() 6 | return ( 7 | : } 11 | borderRadius="md" 12 | onClick={toggleColorMode} 13 | /> 14 | ) 15 | } 16 | 17 | export default ThemeToggle 18 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-Auth-Template/src/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | import { validateUserLogin, validateUserRegister } from '../middlewares/validators/authValidator.js'; 3 | import { loginUser, registerUser } from '../controllers/authController.js'; 4 | 5 | const router = express.Router(); 6 | 7 | // Validate registration input 8 | router.post('/register',validateUserRegister, registerUser); 9 | 10 | // Validate login input 11 | router.post('/login', validateUserLogin,loginUser); 12 | 13 | export default router; 14 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | 4 | // import your files 5 | import { port } from "./config/initial.config"; 6 | import connectDB from './config/db.config'; 7 | 8 | // initializing the app 9 | const app: Express = express(); 10 | app.use(express.json()); 11 | 12 | // rest of your code here 13 | 14 | 15 | // database connection 16 | connectDB(); 17 | 18 | app.listen(port, () => { 19 | console.log(`Server running on http://localhost:/${port}/`); 20 | }); 21 | -------------------------------------------------------------------------------- /renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | "schedule:weekly", 6 | "group:allNonMajor" 7 | ], 8 | "labels": [ 9 | "dependencies" 10 | ], 11 | "ignorePaths": [ 12 | "**/typescript/**", 13 | "**/node_modules/**", 14 | "**/__tests__/**", 15 | "**/__mocks__/**", 16 | "**/dist/**", 17 | "**/coverage/**", 18 | "/yonode.org/**", 19 | "/docs.yonode.org/**" 20 | ], 21 | "rangeStrategy": "bump", 22 | "reviewers": ["isasharafdin"] 23 | } 24 | -------------------------------------------------------------------------------- /yonode.org/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | .vscode 4 | 5 | # dependencies 6 | /node_modules 7 | /.pnp 8 | .pnp.js 9 | 10 | # testing 11 | /coverage 12 | 13 | # next.js 14 | /.next/ 15 | /out/ 16 | 17 | # production 18 | /build 19 | 20 | # misc 21 | .DS_Store 22 | *.pem 23 | 24 | # debug 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | .pnpm-debug.log* 29 | 30 | # local env files 31 | .env*.local 32 | 33 | # vercel 34 | .vercel 35 | 36 | # typescript 37 | *.tsbuildinfo 38 | 39 | .contentlayer -------------------------------------------------------------------------------- /yonode.org/components/seo/seo.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { NextSeo, NextSeoProps } from 'next-seo' 3 | import siteConfig from 'data/config' 4 | 5 | export interface SEOProps extends NextSeoProps {} 6 | 7 | export const SEO = ({ title, description, ...props }: SEOProps) => ( 8 | 16 | ) 17 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import the packages 2 | import express, { Express } from "express"; 3 | 4 | // import your files 5 | import { port } from "./config/initial.config"; 6 | import { connectDB } from "./config/db.config"; 7 | import "./models/models" 8 | 9 | // initializing the app 10 | const app: Express = express(); 11 | app.use(express.json()); 12 | 13 | // rest of your code here 14 | 15 | // database connection 16 | connectDB(); 17 | 18 | app.listen(port, () => { 19 | console.log(`Server running on http://localhost:/${port}`); 20 | }); -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/app.ts: -------------------------------------------------------------------------------- 1 | // import packages 2 | import express, { Express } from 'express'; 3 | 4 | // import files 5 | import { port } from './config/initial.config'; 6 | import { connectDB } from './config/db.config'; 7 | import "./models/models" 8 | 9 | 10 | // Initialize app 11 | const app: Express = express(); 12 | app.use(express.json()); 13 | 14 | // // rest of your code here 15 | 16 | // database connection 17 | connectDB(); 18 | 19 | app.listen(port, () => { 20 | console.log(`Server running on http://localhost:/${port}`); 21 | }); -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? 5 | // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init 6 | 7 | generator client { 8 | provider = "prisma-client-js" 9 | } 10 | 11 | datasource db { 12 | provider = "mysql" 13 | url = env("DATABASE_URL") 14 | } 15 | 16 | model modelName { 17 | id Int @id @default(autoincrement()) 18 | } -------------------------------------------------------------------------------- /yonode.org/hooks/use-route-changed.ts: -------------------------------------------------------------------------------- 1 | import { useRouter } from 'next/router' 2 | import { useEffect } from 'react' 3 | 4 | const useRouteChanged = (fn: () => void) => { 5 | const router = useRouter() 6 | useEffect(() => { 7 | const handleRouteChange = (url: string) => { 8 | fn() 9 | console.log('App is changing to: ', url) 10 | } 11 | 12 | router.events.on('routeChangeComplete', handleRouteChange) 13 | 14 | return () => { 15 | router.events.off('routeChangeComplete', handleRouteChange) 16 | } 17 | }, [router.events, fn]) 18 | } 19 | 20 | export default useRouteChanged 21 | -------------------------------------------------------------------------------- /docs.yonode.org/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": false, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "incremental": true, 11 | "esModuleInterop": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "jsx": "preserve" 17 | }, 18 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/config/db.config.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { EntityName } from "../entity/Entity"; 4 | import { dbName, dbUrl } from "./initial.config"; 5 | 6 | const AppDataSource = new DataSource({ 7 | type: "mysql", 8 | url: dbUrl, 9 | database: dbName, 10 | entities: [EntityName], 11 | }); 12 | AppDataSource.initialize() 13 | .then(async () => { 14 | console.log(`Connected to the database`); 15 | }) 16 | .catch((error) => console.error("Error connecting to database", error)); 17 | export default AppDataSource; 18 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/config/db.config.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { EntityName } from "../entity/Entity"; 4 | import { dbName, dbUrl } from "./initial.config"; 5 | 6 | const AppDataSource = new DataSource({ 7 | type: "mongodb", 8 | url: dbUrl, 9 | database: dbName, 10 | entities: [EntityName], 11 | }); 12 | AppDataSource.initialize() 13 | .then(async () => { 14 | console.log(`connected to the database`); 15 | }) 16 | .catch((error) => console.error("Error connecting to database", error)); 17 | export default AppDataSource; 18 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/config/db.config.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { EntityName } from "../entity/Entity"; 4 | import { dbName, dbUrl } from "./initial.config"; 5 | 6 | const AppDataSource = new DataSource({ 7 | type: "postgres", 8 | url: dbUrl, 9 | database: dbName, 10 | entities: [EntityName], 11 | }); 12 | AppDataSource.initialize() 13 | .then(async () => { 14 | console.log(`Connected to the database`); 15 | }) 16 | .catch((error) => console.error("Error connecting to database", error)); 17 | export default AppDataSource; 18 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-Auth-Template/src/models/User.js: -------------------------------------------------------------------------------- 1 | import sequelize from '../config/dbConfig.js'; 2 | import { DataTypes } from 'sequelize'; 3 | 4 | // Define a schema for the user with email and password fields 5 | const User = sequelize.define('User', { 6 | email:{ 7 | type: DataTypes.STRING, 8 | allowNull: false, // Makes this field mandatory 9 | unique: true, // // Ensures email addresses are unique in the database 10 | }, 11 | password: { 12 | type: DataTypes.STRING, 13 | allowNull: false, // Makes this field mandatory 14 | } 15 | }) 16 | 17 | export default User; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/src/config/db.config.ts: -------------------------------------------------------------------------------- 1 | import { Sequelize } from "sequelize"; 2 | import { dbUrl } from "./initial.config"; 3 | 4 | const sequelize = new Sequelize(dbUrl); 5 | 6 | export const connectDB = async (): Promise => { 7 | try { 8 | await sequelize.authenticate(); 9 | console.log("Connected to the database"); 10 | await sequelize.sync(); 11 | console.log("Model synced successfully"); 12 | } catch (error) { 13 | console.error("Error connecting to database", error); 14 | process.exit(1); 15 | } 16 | } 17 | 18 | export default sequelize; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-Auth-Template/src/models/User.js: -------------------------------------------------------------------------------- 1 | import sequelize from '../config/dbConfig.js'; 2 | import { DataTypes } from 'sequelize'; 3 | 4 | // Define a schema for the user with email and password fields 5 | const User = sequelize.define('User', { 6 | email:{ 7 | type: DataTypes.STRING, 8 | allowNull: false, // Makes this field mandatory 9 | unique: true, // // Ensures email addresses are unique in the database 10 | }, 11 | password: { 12 | type: DataTypes.STRING, 13 | allowNull: false, // Makes this field mandatory 14 | } 15 | }) 16 | 17 | export default User; -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/src/config/db.config.ts: -------------------------------------------------------------------------------- 1 | import { Sequelize } from "sequelize"; 2 | import { dbUrl } from "./initial.config"; 3 | 4 | const sequelize = new Sequelize(dbUrl); 5 | 6 | export const connectDB = async (): Promise => { 7 | try { 8 | await sequelize.authenticate(); 9 | console.log("Connected to the database"); 10 | await sequelize.sync(); 11 | console.log("Model synced successfully"); 12 | } catch (error) { 13 | console.error("Error connecting to database", error); 14 | process.exit(1); 15 | } 16 | } 17 | 18 | export default sequelize; -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/controllers/helloWorldController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple controller function to handle requests to the '/' route 3 | * @param {object} req The request object 4 | * @param {object} res The response object 5 | * @returns {object} The response object 6 | */ 7 | export const helloWorld = async (req, res) => { 8 | try { 9 | // Send a response to the client 10 | res.send("Hello world!"); 11 | } catch (err) { 12 | // If there is an error, send a 500 error with a JSON response 13 | res.status(500).json({ 14 | message: "Internal Server Error", 15 | }); 16 | } 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-Auth-Template/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? 5 | // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init 6 | 7 | generator client { 8 | provider = "prisma-client-js" 9 | } 10 | 11 | datasource db { 12 | provider = "mysql" 13 | url = env("DATABASE_URL") 14 | } 15 | 16 | model User { 17 | id Int @id @default(autoincrement()) 18 | email String @unique 19 | password String 20 | } 21 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-Auth-Template/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? 5 | // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init 6 | 7 | generator client { 8 | provider = "prisma-client-js" 9 | } 10 | 11 | datasource db { 12 | provider = "postgresql" 13 | url = env("DATABASE_URL") 14 | } 15 | 16 | model User{ 17 | id Int @id @default(autoincrement()) 18 | email String @unique 19 | password String 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/Auth/src/config/db.config.js: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { dbURL } from "./initial.config.js"; 4 | import chalk from "chalk"; 5 | import User from "../entity/User.entity.js"; 6 | 7 | const AppDataSource = new DataSource({ 8 | type: "mongodb", 9 | url: dbURL, 10 | database: "yonode", 11 | entities: [User], 12 | synchronize: true, 13 | }); 14 | AppDataSource.initialize() 15 | .then(async () => { 16 | console.log(`${chalk.green.bold("Connected")} to the database ✅`); 17 | }) 18 | .catch((error) => console.log(error)); 19 | export default AppDataSource; 20 | -------------------------------------------------------------------------------- /yonode.org/components/motion/fall-in-place.tsx: -------------------------------------------------------------------------------- 1 | import { MotionBox, MotionBoxProps } from './box' 2 | import React from 'react' 3 | 4 | export const FallInPlace: React.FC = ( 5 | props 6 | ) => { 7 | const { children, delay = 0.2, ...rest } = props 8 | return ( 9 | 20 | {children} 21 | 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? 5 | // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init 6 | 7 | generator client { 8 | provider = "prisma-client-js" 9 | } 10 | 11 | datasource db { 12 | provider = "mongodb" 13 | url = env("DATABASE_URL") 14 | } 15 | 16 | model User { 17 | id String @id @default(auto()) @map("_id") @db.ObjectId 18 | email String @unique 19 | password String 20 | } 21 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-Auth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import chalk from "chalk"; 2 | import { Sequelize } from "sequelize"; 3 | import { dbUrl } from "./initailConfig.js"; 4 | 5 | const sequelize = new Sequelize(dbUrl); 6 | 7 | export const connectDB = async () => { 8 | try { 9 | await sequelize.authenticate(); 10 | console.log(`${chalk.green.bold("Connected")} to the database`); 11 | await sequelize.sync(); 12 | console.log(`${chalk.green.bold("Models synced")} successfully`); 13 | } catch (error) { 14 | console.log(`${chalk.red.bold("Error")} connecting to database `, error); 15 | } 16 | }; 17 | 18 | export default sequelize; 19 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Prisma/Auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yonode-api-starter", 3 | "version": "1.0.0", 4 | "type": "module", 5 | "main": "./src/app.js", 6 | "license": "MIT", 7 | "scripts": { 8 | "start": "node ./src/app.js", 9 | "dev": "nodemon ./src/app.js" 10 | }, 11 | "dependencies": { 12 | "bcrypt": "^5.1.1", 13 | "body-parser": "^1.20.2", 14 | "chalk": "^5.3.0", 15 | "cors": "^2.8.5", 16 | "dotenv": "^16.4.1", 17 | "express": "^4.18.2", 18 | "helmet": "^7.1.0", 19 | "morgan": "^1.10.0", 20 | "nodemon": "^3.0.3" 21 | }, 22 | "devDependencies": { 23 | "prisma": "^5.9.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template/src/models/User.js: -------------------------------------------------------------------------------- 1 | // Import required modules and configuration 2 | import mongoose from "mongoose"; 3 | 4 | // Define a schema for the user with email and password fields 5 | const UserSchema = new mongoose.Schema({ 6 | email: { 7 | type: String, 8 | required: true, // Makes this field mandatory 9 | unique: true, // Ensures email addresses are unique in the database 10 | }, 11 | password: { 12 | type: String, 13 | required: true, // Makes this field mandatory 14 | }, 15 | }); 16 | 17 | // Create and export the User model 18 | const User = mongoose.model("User", UserSchema); 19 | export default User; 20 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MySQL with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MySQL with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MYSQL with Sequelize 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MySQL with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { dbName, dbUrl } from "./initialConfig.js"; 4 | import chalk from "chalk"; 5 | 6 | const AppDataSource = new DataSource({ 7 | type: "mysql", 8 | url: dbUrl, 9 | database: dbName, 10 | entities: ["../entity/*/.js"], 11 | }); 12 | 13 | AppDataSource.initialize() 14 | .then(async () => { 15 | console.log(`${chalk.green.bold('Connected')} to the database`); 16 | }) 17 | .catch((error) => 18 | console.log(`${chalk.red.bold('Error')} connecting to database`, error) 19 | ); 20 | 21 | export default AppDataSource; 22 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MongoDB with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MongoDB with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MongoDB with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MySQL with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /yonode.org/components/typography/index.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | chakra, 3 | HTMLChakraProps, 4 | Text, 5 | TextProps, 6 | useColorModeValue, 7 | } from '@chakra-ui/react' 8 | 9 | export const Em: React.FC> = ({ children, ...props }) => { 10 | return ( 11 | 17 | {children} 18 | 19 | ) 20 | } 21 | 22 | // @todo make this configurable 23 | export const Br: React.FC> = (props) => { 24 | return ( 25 | 26 |
27 |
28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MongoDB with Mongoose 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MongoDB with Mongoose 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MongoDB with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + MySQL with Sequelize 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + PostgreSQL with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + PostgreSQL with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { dbName, dbUrl } from "./initialConfig.js"; 4 | import chalk from "chalk"; 5 | 6 | const AppDataSource = new DataSource({ 7 | type: "postgres", 8 | url: dbUrl, 9 | database: dbName, 10 | entities: ["../entity/*/.js"], 11 | }); 12 | 13 | AppDataSource.initialize() 14 | .then(async () => { 15 | console.log(`${chalk.green.bold('Connected')} to the database`); 16 | }) 17 | .catch((error) => 18 | console.log(`${chalk.red.bold('Error')} connecting to database`, error) 19 | ); 20 | 21 | export default AppDataSource; 22 | -------------------------------------------------------------------------------- /yonode.org/theme/components/button.ts: -------------------------------------------------------------------------------- 1 | import { mode } from '@chakra-ui/theme-tools' 2 | 3 | type Dict = Record 4 | 5 | export default { 6 | variants: { 7 | 'nav-link': (props: Dict) => { 8 | const { isActive } = props 9 | 10 | const hoverColor = mode('gray.900', 'white')(props) 11 | return { 12 | outline: 'none', 13 | fontWeight: '500', 14 | color: isActive 15 | ? hoverColor 16 | : mode('gray.700', 'whiteAlpha.700')(props), 17 | transition: 'color .2s ease-in', 18 | _hover: { 19 | textDecoration: 'none', 20 | color: hoverColor, 21 | }, 22 | } 23 | }, 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-Auth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + PostgreSQL with Sequelize 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + PostgreSQL with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | The server is running and ready to serve requests. 21 | 22 | Now, Go to the Src directory and start building the server. 23 | 24 | Happy coding! 25 | 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + MySQL with TypeOrm 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/prisma/Noauth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + Mysql with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + PostgreSQL with Sequelize 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | The server is running and ready to serve requests. 21 | 22 | Now, Go to the Src directory and start building the server. 23 | 24 | Happy coding! 25 | 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + MongoDB with TypeORM 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MySQL/Sequelize/NoAuth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + Mysql with Sequelize 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + MongoDB with Mongoose 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + PostgreSQL with Prisma 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + PostgreSQL with TypeOrm 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/typescript/PostgreSQL/Sequelize/NoAuth/README.md: -------------------------------------------------------------------------------- 1 | # Yonode + TypeScript + Postgresql with Sequelize 2 | 3 | This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. 4 | 5 | ## Getting Started 6 | 7 | Initially, navigate to the .env file to set up the required environment variables. 8 | 9 | Next, launch the development server: 10 | 11 | ```bash 12 | npm start 13 | # or 14 | yarn start 15 | # or 16 | pnpm start 17 | # or 18 | bun start 19 | ``` 20 | 21 | The server is running and ready to serve requests. 22 | 23 | Now, Go to the Src directory and start building the server. 24 | 25 | Happy coding! 26 | -------------------------------------------------------------------------------- /yonode.org/components/motion/float.tsx: -------------------------------------------------------------------------------- 1 | import { MotionBox, MotionBoxProps } from './box' 2 | import React from 'react' 3 | 4 | export const Float: React.FC< 5 | MotionBoxProps & { delay?: number; steps?: number[] } 6 | > = (props) => { 7 | const { children, delay = 0.2, steps = [10, -10, 10], ...rest } = props 8 | return ( 9 | 22 | {children} 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import chalk from "chalk"; 2 | import { Sequelize } from "sequelize" 3 | import { dbUrl } from "./initialConfig.js"; 4 | 5 | export const sequelize = new Sequelize(dbUrl); 6 | export const connectDB = async () => { 7 | try { 8 | await sequelize.authenticate(); 9 | console.log(`${chalk.green.bold('Connected')} to the database`); 10 | await sequelize.sync(); 11 | console.log(`${chalk.green.bold('Models synced')} successfully`); 12 | } catch (error) { 13 | console.log(`${chalk.red.bold('Error')} connecting to database`, error); 14 | process.exit(1); 15 | } 16 | } 17 | 18 | export default sequelize; 19 | -------------------------------------------------------------------------------- /yonode.org/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type { AppProps } from 'next/app' 2 | 3 | import { AuthProvider, SaasProvider } from '@saas-ui/react' 4 | import { Layout } from 'components/layout' 5 | 6 | import theme from '../theme' 7 | 8 | function MyApp({ Component, pageProps }: AppProps) { 9 | const { announcement, header, footer } = pageProps 10 | 11 | return ( 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | ) 24 | } 25 | 26 | export default MyApp 27 | -------------------------------------------------------------------------------- /packages/yonode/src/lib/prompt/db.js: -------------------------------------------------------------------------------- 1 | import inquirer from "inquirer"; 2 | import { options } from "../../index.js"; 3 | import { dbQuestion } from "../questions.js"; 4 | import { repoConditions } from "../repoConditions.js"; 5 | import { databaseType } from "./dbType.js"; 6 | 7 | export const databaseConfirmQuestion = () => { 8 | inquirer 9 | .prompt(dbQuestion) 10 | .then((answer) => { 11 | if (answer.dbQuestion === true) { 12 | databaseType(); 13 | } else if(answer.dbQuestion === false) { 14 | options.database = answer.dbQuestion; 15 | repoConditions(); 16 | } 17 | }) 18 | .catch((error) => { 19 | if (error.isTtyError) { 20 | } else { 21 | } 22 | }); 23 | }; 24 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MySQL-TypeORM-Auth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { dbName, dbUrl } from "./initialConfig.js"; 4 | import chalk from "chalk"; 5 | import User from "../entity/User.js"; 6 | 7 | const AppDataSource = new DataSource({ 8 | type: "mysql", 9 | url: dbUrl, 10 | database: dbName, 11 | entities: [User], 12 | synchronize: true, 13 | }); 14 | 15 | AppDataSource.initialize() 16 | .then(async () => { 17 | console.log(`${chalk.green.bold("Connected")} to the database`); 18 | }) 19 | .catch((error) => 20 | console.log(`${chalk.red.bold("Error")} connecting to database`, error) 21 | ); 22 | 23 | export default AppDataSource; 24 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { dbName, dbUrl } from "./initialConfig.js"; 4 | import chalk from "chalk"; 5 | 6 | const AppDataSource = new DataSource({ 7 | type: "mongodb", 8 | url: dbUrl, 9 | database: dbName, 10 | entities: ["../entity/**/*.js"], 11 | synchronize: true, 12 | authSource: "admin" 13 | }); 14 | 15 | AppDataSource.initialize() 16 | .then(async () => { 17 | console.log(`${chalk.green.bold('Connected')} to the database`); 18 | }) 19 | .catch((error) => 20 | console.log(`${chalk.red.bold('Error')} connecting to database`, error) 21 | ); 22 | 23 | export default AppDataSource; 24 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import { Sequelize } from 'sequelize'; 2 | import { dbUrl} from './initialConfig.js' 3 | import chalk from 'chalk'; 4 | 5 | const sequelize = new Sequelize(dbUrl); 6 | export const connectDB = async () => { 7 | try { 8 | await sequelize.authenticate(); 9 | console.log(`${chalk.green.bold('Connected')} to the database`); 10 | await sequelize.sync({ force: true }); 11 | console.log(`${chalk.green.bold('Models synced')} successfully`); 12 | } catch (error) { 13 | console.log(`${chalk.red.bold('Error')} connecting to database`, error); 14 | process.exit(1); 15 | } 16 | } 17 | 18 | export default sequelize; 19 | -------------------------------------------------------------------------------- /packages/yonode-templates/JS-PostgreSQL-TypeORM-Auth-Template/src/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { DataSource } from "typeorm"; 3 | import { dbName, dbUrl } from "./initialConfig.js"; 4 | import chalk from "chalk"; 5 | import User from "../entity/User.js"; 6 | 7 | const AppDataSource = new DataSource({ 8 | type: "postgres", 9 | url: dbUrl, 10 | database: dbName, 11 | entities: [User], 12 | synchronize: true, 13 | }); 14 | 15 | AppDataSource.initialize() 16 | .then(async () => { 17 | console.log(`${chalk.green.bold("Connected")} to the database`); 18 | }) 19 | .catch((error) => 20 | console.log(`${chalk.red.bold("Error")} connecting to database`, error) 21 | ); 22 | 23 | export default AppDataSource; 24 | -------------------------------------------------------------------------------- /yonode.org/components/nav-link/nav-link.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from '@chakra-ui/react' 2 | 3 | import { Button, ButtonProps } from '@saas-ui/react' 4 | 5 | import Link from 'next/link' 6 | 7 | export interface NavLinkProps extends ButtonProps { 8 | isActive?: boolean 9 | href?: string 10 | id?: string 11 | } 12 | 13 | export const NavLink = forwardRef((props, ref) => { 14 | const { href, type, isActive, ...rest } = props 15 | 16 | return ( 17 |