Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Backend GitHub Actions

on:
# Runs on creating a PR
pull_request:
branches:
- main
paths:
- 'backend/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
backend:
name: Backend
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: write

steps:
- name: Notify Trigger
run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event on branch ${{ github.ref }}."

- name: Checkout Repository
uses: actions/checkout@v4

- name: Run lint
uses: chartboost/ruff-action@v1
with:
args: --check ./backend

- name: Display Job Status
run: echo "🍏 This job's status is ${{ job.status }}."
44 changes: 44 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Frontend GitHub Actions

on:
# Runs on creating a PR
pull_request:
branches:
- main
paths:
- 'frontend/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
frontend:
name: Frontend
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: write

steps:
- name: Notify Trigger
run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event on branch ${{ github.ref }}."

- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js 20.6.0
uses: actions/setup-node@v3
with:
node-version: 20.6.0

- name: Install dependencies
working-directory: ./frontend
run: yarn

- name: Run lint
working-directory: ./frontend
run: yarn lint

- name: Display Job Status
run: echo "🍏 This job's status is ${{ job.status }}."
244 changes: 132 additions & 112 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,117 +2,137 @@ This is the commune ai project.

**This project has three roles: user, owner, and friend like social network**

**1. Frontend Running**
# Next.js Project

This is a Next.js project created to demonstrate how to run a Next.js application.

## Getting Started

To get started with this project, follow the steps below:

1. Clone the repository:

```
git clone https://github.com/commune-ai/frontend.git
```

2. Install the dependencies:

```
cd next-js-project
npm install
```

3. Run the development server:

```
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) in your browser to see the application running.

## Available Scripts

In the project directory, you can run the following scripts:

### `npm run dev`

Runs the app in development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br />
You will also see any lint errors in the console.

### `npm run build`

Builds the app for production to the `.next` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

### `npm start`

Starts the app in production mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

## Learn More

To learn more about Next.js, check out the [Next.js documentation](https://nextjs.org/docs).

**2. Backend**

- go to backend folder and follow the steps
# Django Project

This is a Django project created to demonstrate how to run a Django application.

## Getting Started

To get started with this project, follow the steps below:

1. Clone the repository:

```
git clone https://github.com/your-username/django-project.git
```

2. Install the dependencies:

```
cd django-project
pip install -r requirements.txt
```

3. Run the development server:

```
python manage.py runserver
```

Open [http://localhost:8000](http://localhost:8000) in your browser to see the application running.

## Available Commands

In the project directory, you can run the following commands:

### `python manage.py runserver`

Runs the development server.<br />
Open [http://localhost:8000](http://localhost:8000) to view it in the browser.

The server will automatically reload if you make changes to the code.

### `python manage.py migrate`

Applies any database migrations needed for the project.

### `python manage.py createsuperuser`

Creates a superuser for the admin interface.

## Learn More

To learn more about Django, check out the [Django documentation](https://docs.djangoproject.com/).

## License
# 1. Frontend Running

This is based on Next.js.

## Getting Started

To get started with this project, follow the steps below:

1. Clone the repository:

```
git clone https://github.com/commune-ai/frontend.git
```

2. Go to frontend main directory

```
cd frontend
```

3. Install the dependencies:

```
yarn
```
Preferred Node version is 20.6.0.

If yarn is not installed yet, you can install by running :

```
npm i -g yarn
```

4. Run the development server:

```
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) in your browser to see the application running.

## Available Scripts

In the project directory, you can run the following scripts:

### `yarn dev`

Runs the app in development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br />
You will also see any lint errors in the console.

### `yarn build`

Builds the app for production to the `.next` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

### `yarn start`

Starts the app in production mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

### `yarn lint`

Look for programming errors, bugs, stylistic errors.

## Learn More

To learn more about Next.js, check out the [Next.js documentation](https://nextjs.org/docs).

# 2. Backend Running

This is based on Django.

## Getting Started

To get started with this project, follow the steps below:

1. Go to backend main directory

```
cd backend
```

2. Install the dependencies:

```
pip install -r requirements.txt
```
Preferred Python version is 3.11.4.

3. Run the development server:

```
python manage.py runserver
```

Open [http://localhost:8000](http://localhost:8000) in your browser to see the application running.

## Available Commands

In the project directory, you can run the following commands:

### `python manage.py runserver`

Runs the development server.<br />
Open [http://localhost:8000](http://localhost:8000) to view it in the browser.

The server will automatically reload if you make changes to the code.

### `python manage.py migrate`

Applies any database migrations needed for the project.

### `python manage.py createsuperuser`

Creates a superuser for the admin interface.

### `ruff check`

Look for programming errors, bugs, stylistic errors.

## Learn More

To learn more about Django, check out the [Django documentation](https://docs.djangoproject.com/).

# Prerequisites

Before you create a pull request, please make sure that you have run lint on your code changes. This will help ensure that your code meets our style guidelines and is easy to review.

# License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Binary file modified backend/requirements.txt
Binary file not shown.
10 changes: 6 additions & 4 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"typecheck": "tsc --noEmit"
},
"dependencies": {
Expand All @@ -27,14 +28,10 @@
"@stripe/react-stripe-js": "^2.4.0",
"@stripe/stripe-js": "^2.3.0",
"@types/mdx": "^2.0.10",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@web3modal/wagmi": "3.2.1",
"antd": "^5.12.8",
"axios": "^1.6.5",
"classnames": "^2.3.2",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.3",
"eslint-plugin-react": "^7.34.0",
"ethers": "^6.11.1",
"moralis": "^2.23.2",
"next": "14.0.1",
Expand Down Expand Up @@ -64,10 +61,15 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"autoprefixer": "^10.0.1",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.0",
"postcss": "^8",
"prettier": "^3.2.5",
"tailwindcss": "^3.3.0",
"typescript": "^5",
"webpack-bundle-analyzer": "^4.4.2",
Expand Down