mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
feat(docs): Update README.md and CONTRIBUTING.md
This commit is contained in:
+66
-15
@@ -127,33 +127,84 @@ Using clear and consistent commit messages makes it easier for everyone to under
|
||||
|
||||
To set up your local development environment:
|
||||
|
||||
### Option 1: Using Docker (Recommended)
|
||||
|
||||
Docker provides a consistent development environment with all dependencies pre-configured.
|
||||
|
||||
1. **Clone the Repository:**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/sim.git
|
||||
cd sim
|
||||
```
|
||||
|
||||
2. **Start the Docker Environment:**
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Or use the convenience script which handles environment setup and migrations:
|
||||
|
||||
```bash
|
||||
chmod +x start_simstudio_docker.sh
|
||||
./start_simstudio_docker.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
|
||||
- Start a PostgreSQL database container
|
||||
- Build and run the Next.js application with hot-reloading
|
||||
- Set up all necessary environment variables
|
||||
- Apply database migrations automatically
|
||||
|
||||
3. **View Logs:**
|
||||
|
||||
```bash
|
||||
docker compose logs -f simstudio
|
||||
```
|
||||
|
||||
4. **Make Your Changes:**
|
||||
- Edit files in your local directory
|
||||
- Changes will be automatically reflected thanks to hot-reloading
|
||||
|
||||
### Option 2: Manual Setup
|
||||
|
||||
If you prefer not to use Docker:
|
||||
|
||||
1. **Clone the Repository:**
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/sim-studio.git
|
||||
git clone https://github.com/<your-username>/sim.git
|
||||
cd sim
|
||||
```
|
||||
2. **Navigate to the Project Directory:**
|
||||
```bash
|
||||
cd sim-studio
|
||||
```
|
||||
3. **Install Dependencies:**
|
||||
- Using Yarn:
|
||||
```bash
|
||||
yarn install
|
||||
```
|
||||
- Or using NPM:
|
||||
2. **Install Dependencies:**
|
||||
|
||||
- Using NPM:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
4. **Run the Development Server:**
|
||||
- With Yarn:
|
||||
|
||||
3. **Set Up Environment:**
|
||||
|
||||
- Copy `.env.example` to `.env`
|
||||
- Configure database connection and other required variables
|
||||
|
||||
4. **Set Up Database:**
|
||||
|
||||
- You need a PostgreSQL instance running
|
||||
- Run migrations:
|
||||
```bash
|
||||
yarn dev
|
||||
npm run db:push
|
||||
```
|
||||
|
||||
5. **Run the Development Server:**
|
||||
|
||||
- With NPM:
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
5. **Make Your Changes and Test Locally.**
|
||||
|
||||
6. **Make Your Changes and Test Locally.**
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -9,22 +9,52 @@
|
||||
1. Self-host
|
||||
2. [Join the Waitlist](https://simstudio.ai) for the cloud-hosted beta
|
||||
|
||||
## Getting Started
|
||||
## Quick Start
|
||||
|
||||
1. Clone the repository
|
||||
The quickest way to get Sim Studio running locally:
|
||||
|
||||
1. **Clone the repository**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/simstudioai/sim.git
|
||||
cd sim-studio
|
||||
cd sim
|
||||
```
|
||||
|
||||
2. Install dependencies
|
||||
2. **Start with Docker**
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Or use the convenience script for automatic setup:
|
||||
|
||||
```bash
|
||||
chmod +x start_simstudio_docker.sh
|
||||
./start_simstudio_docker.sh
|
||||
```
|
||||
|
||||
This will start Sim Studio at http://localhost:3000 with a local PostgreSQL database.
|
||||
|
||||
3. **[Optional] Configure Your Environment**
|
||||
|
||||
Copy `.env.example` to `.env` and configure:
|
||||
|
||||
- Authentication secrets (required for login functionality)
|
||||
- API keys:
|
||||
- **Essential**: Resend API key (for authentication emails)
|
||||
- **Optional**: OpenAI, Anthropic, etc. (for specific block functionality)
|
||||
|
||||
## Manual Setup
|
||||
|
||||
If you prefer not to use Docker:
|
||||
|
||||
1. **Install dependencies**
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Set up your environment variables
|
||||
2. **Set up environment variables**
|
||||
|
||||
Copy `.env.example` to `.env` and configure:
|
||||
|
||||
@@ -32,20 +62,20 @@ Copy `.env.example` to `.env` and configure:
|
||||
- Authentication secret
|
||||
- Email provider (Resend)
|
||||
|
||||
4. Set up the database
|
||||
3. **Set up the database**
|
||||
|
||||
```bash
|
||||
# Push the database schema
|
||||
npx drizzle-kit push
|
||||
```
|
||||
|
||||
5. Start the development server
|
||||
4. **Start the development server**
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
6. Open [http://localhost:3000](http://localhost:3000)
|
||||
5. **Open [http://localhost:3000](http://localhost:3000)**
|
||||
|
||||
## Tech Stack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user