|
| 1 | +# 📖 Storyloom |
| 2 | + |
| 3 | +> In progress... |
| 4 | +
|
| 5 | +## ✨ What is Storyloom? |
| 6 | + |
| 7 | +StoryLoom can generate bedtime stories using AI based on the child's age, likings, behaviors, and more. We use generative TTS to read the stories to the child. |
| 8 | + |
| 9 | +## 🏗️ Project Structure |
| 10 | + |
| 11 | +```zsh |
| 12 | +storyloom/ |
| 13 | +├── apps/ |
| 14 | +│ ├── python/ # Python backend application |
| 15 | +│ └── web/ # Next.js web application |
| 16 | +├── package.json # Root package configuration |
| 17 | +├── pnpm-workspace.yaml # pnpm workspace configuration |
| 18 | +└── turbo.json # Turbo monorepo configuration |
| 19 | +``` |
| 20 | + |
| 21 | +## ⚙️ Setup |
| 22 | + |
| 23 | +### Prerequisites |
| 24 | + |
| 25 | +Before you begin, ensure you have the following installed: |
| 26 | + |
| 27 | +- **Node.js** (v18 or later) |
| 28 | +- **pnpm** (v8 or later) |
| 29 | +- **Python** (v3.8 or later) |
| 30 | + |
| 31 | +### 1. Fork the repository |
| 32 | + |
| 33 | +### 2. Clone your forked repository |
| 34 | + |
| 35 | +```bash |
| 36 | +git clone https://github.com/<your-username>/storyloom.git |
| 37 | +cd storyloom |
| 38 | +``` |
| 39 | + |
| 40 | +### 2. Install Dependencies |
| 41 | + |
| 42 | +```bash |
| 43 | +pnpm install |
| 44 | +``` |
| 45 | + |
| 46 | +### 3. Environment Variables |
| 47 | + |
| 48 | +Make a copy of the `.env.example` file and name it `.env` for each application under the `apps/` directory. |
| 49 | + |
| 50 | +```bash |
| 51 | +cp apps/web/.env.example apps/web/.env |
| 52 | +cp apps/python/.env.example apps/python/.env |
| 53 | +``` |
| 54 | + |
| 55 | +Make sure to fill in the values for the environment variables. |
| 56 | + |
| 57 | +Make sure your AWS credentials has the following managed policies: |
| 58 | + |
| 59 | +- AmazonDynamoDBFullAccess |
| 60 | +- AmazonAPIGatewayAdministrator |
| 61 | +- AmazonS3FullAccess |
| 62 | +- AWSCloudFormationFullAccess |
| 63 | +- AWSLambda_FullAccess |
| 64 | + |
| 65 | +### 4. Database Setup |
| 66 | + |
| 67 | +1. Create a two tables called `storyloom-users` and `storyloom-auth` in DynamoDB |
| 68 | +2. Setup auth table to have partition key as `pk` and sort key as `sk`. You may also create a global secondary index on the `email` attribute. |
| 69 | +3. Setup user table to have partition key as `email`. |
| 70 | + |
| 71 | +### 5. Run the Development Server |
| 72 | + |
| 73 | +```bash |
| 74 | +turbo dev |
| 75 | +``` |
| 76 | + |
| 77 | +### 6. Verify Setup |
| 78 | + |
| 79 | +- Open [http://localhost:3000](http://localhost:3000) in your browser |
| 80 | +- You should see the Storyloom homepage |
| 81 | +- Try signing in to test authentication |
| 82 | + |
| 83 | +## 🤝 Contributing |
| 84 | + |
| 85 | +We welcome contributions! Here's how you can help: |
| 86 | + |
| 87 | +### Ways to Contribute |
| 88 | + |
| 89 | +- Report bugs or request features by [creating an issue](https://github.com/tiluckdave/storyloom/issues) |
| 90 | +- Submit code changes by making a pull request to solve existing issues |
| 91 | + |
| 92 | +### Development Workflow |
| 93 | + |
| 94 | +1. Fork this repository |
| 95 | +2. Clone your fork |
| 96 | +3. Add the upstream remote: `git remote add upstream https://github.com/tiluckdave/storyloom.git` |
| 97 | +4. Create a feature branch: `git checkout -b feature/amazing-feature` |
| 98 | +5. Make your changes and test them |
| 99 | +6. Commit your changes: `git commit -m 'Add amazing feature'` |
| 100 | +7. Push to the branch: `git push origin feature/amazing-feature` |
| 101 | +8. Open a Pull Request |
| 102 | + |
| 103 | +### Code Style |
| 104 | + |
| 105 | +- Follow the existing code style and conventions |
| 106 | +- Use TypeScript for type safety |
| 107 | +- Write meaningful commit messages |
| 108 | + |
| 109 | +Make sure to run `turbo lint` and `turbo check-types` to check for any errors. |
0 commit comments