{"id":17114610,"url":"https://github.com/raccoon254/loom","last_synced_at":"2026-01-26T03:32:51.473Z","repository":{"id":257655212,"uuid":"858897116","full_name":"Raccoon254/loom","owner":"Raccoon254","description":"Loom is a modern, lightweight TypeScript-based full-stack web framework designed for building scalable web applications","archived":false,"fork":false,"pushed_at":"2024-10-14T11:37:03.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T06:49:32.331Z","etag":null,"topics":["frameworks","js","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Raccoon254.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-17T18:09:51.000Z","updated_at":"2024-11-19T09:35:23.000Z","dependencies_parsed_at":"2024-09-18T00:16:20.993Z","dependency_job_id":"131dc297-112e-4fb6-aa9f-a33d90f129f7","html_url":"https://github.com/Raccoon254/loom","commit_stats":null,"previous_names":["raccoon254/loom"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raccoon254%2Floom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raccoon254%2Floom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raccoon254%2Floom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raccoon254%2Floom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raccoon254","download_url":"https://codeload.github.com/Raccoon254/loom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236142700,"owners_count":19101659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frameworks","js","typescript"],"created_at":"2024-10-14T17:19:28.693Z","updated_at":"2025-10-12T00:31:16.283Z","avatar_url":"https://github.com/Raccoon254.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loom\n\n**Loom** is a TypeScript full-stack framework built with simplicity and flexibility in mind. Inspired by Laravel’s elegance, Loom integrates **Prisma ORM** for seamless database management, **Express** for handling requests, and a clear structure to make building web applications smooth and intuitive.\n\n## Features\n\n- **TypeScript-first**: Leverage the power of TypeScript for type safety and modern JavaScript features.\n- **Express-powered**: Built on Express, making it fast and familiar to Node.js developers.\n- **Prisma ORM**: Manage your database schema, migrations, and models with Prisma for powerful and intuitive data access.\n- **MVC Pattern**: Provides a clean, organized structure for building and maintaining applications.\n- **Modular Design**: Models, routes, and controllers are easy to manage and extend.\n- **Extensible**: Add custom middleware, routes, and services to suit your application's needs.\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have the following installed on your machine:\n\n- [Node.js](https://nodejs.org/) (v14 or higher)\n- [pnpm](https://pnpm.io/) or npm/yarn as a package manager\n- [Prisma CLI](https://www.prisma.io/docs/getting-started)\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Raccoon254/loom.git\n   cd loom\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pnpm install\n   ```\n\n3. Set up your `.env` file for database configuration (SQLite, PostgreSQL, etc.):\n\n   ```env\n   DATABASE_URL=\"file:./database/dev.db\"  # For SQLite (or use your preferred DB)\n   ```\n\n4. Initialize Prisma:\n\n   ```bash\n   npx prisma init --datasource-provider sqlite\n   ```\n\n5. Run the development server:\n\n   ```bash\n   pnpm run dev\n   ```\n\n6. Access the application at `http://localhost:3000`.\n\n### Project Structure\n\n```\n.\n├── prisma             # Prisma schema and migrations\n│   └── schema.prisma  # Database models and configuration\n├── src\n│   ├── models         # TypeScript models (mapped to Prisma)\n│   ├── routes         # Express route definitions\n│   ├── controllers    # Business logic for your routes\n│   ├── views          # Frontend views (optional)\n│   └── index.ts       # Entry point for the application\n├── .env               # Environment variables (DB connection)\n├── package.json       # Project metadata and scripts\n└── tsconfig.json      # TypeScript configuration\n```\n\n### Example Models\n\nHere’s a sample of how you can structure your models in Loom:\n\n**`src/models/User.ts`**:\n```typescript\nimport { BaseModel, Property, Relation } from './BaseModel';\nimport { Post } from './Post';\n\nexport class User extends BaseModel {\n  static modelName = 'User';\n  static properties: Property[] = [\n    { name: 'id', type: 'number', isUnique: true },\n    { name: 'name', type: 'string' },\n    { name: 'email', type: 'string', isUnique: true },\n    { name: 'createdAt', type: 'date', default: 'now()' },\n  ];\n  static relations: Relation[] = [\n    { name: 'posts', type: 'hasMany', model: 'Post' }\n  ];\n\n  id!: number;\n  name!: string;\n  email!: string;\n  createdAt!: Date;\n  posts?: Post[];\n\n  static async findByEmail(email: string): Promise\u003cUser | null\u003e {\n    const user = await this.prismaModel.findUnique({\n      where: { email },\n    });\n    return user ? Object.assign(new User(), user) : null;\n  }\n\n  static async createUser(data: { name: string; email: string }): Promise\u003cUser\u003e {\n    const user = await this.prismaModel.create({\n      data,\n    });\n    return Object.assign(new User(), user);\n  }\n\n  static async getUserWithPosts(id: number): Promise\u003cUser | null\u003e {\n    const user = await this.prismaModel.findUnique({\n      where: { id },\n      include: { posts: true },\n    });\n    return user ? Object.assign(new User(), user) : null;\n  }\n}\n```\n\n### Example Routes\n\nYou can define routes using Express to handle requests and interact with your models.\n\n**`src/routes/userRoutes.ts`**:\n```typescript\nimport { Router } from 'express';\nimport { UserController } from '../controllers/UserController';\n\nconst router = Router();\nconst userController = new UserController();\n\nrouter.get('/', (req, res) =\u003e userController.index(req, res));\nrouter.get('/:id', (req, res) =\u003e userController.show(req, res));\nrouter.post('/', (req, res) =\u003e userController.store(req, res));\nrouter.put('/:id', (req, res) =\u003e userController.update(req, res));\nrouter.delete('/:id', (req, res) =\u003e userController.destroy(req, res));\nrouter.get('/:id/posts', (req, res) =\u003e userController.getUserPosts(req, res));\n\nexport default router;\n```\n\n### Running the Application\n\nTo start the Loom framework, run the following command:\n\n```bash\npnpm run dev\n```\n\nThe server will be available on `http://localhost:3000`.\n\n### Contributing\n\nWe welcome contributions! Feel free to fork the repository and submit pull requests. If you find any bugs or have suggestions, please open an issue.\n\n### License\n\nLoom is open-source software licensed under the [MIT license](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraccoon254%2Floom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraccoon254%2Floom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraccoon254%2Floom/lists"}