Skip to content
Draft
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
8 changes: 4 additions & 4 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms
github: Jonak-Adipta-Kalita
ko_fi: xxJonakAdiptaxx
# These are supported funding model platforms

github: Jonak-Adipta-Kalita
ko_fi: xxJonakAdiptaxx
32 changes: 16 additions & 16 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/backend"
schedule:
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 3
- package-ecosystem: "npm"
directory: "/frontend"
schedule:
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 2
version: 2

updates:
- package-ecosystem: "pip"
directory: "/backend"
schedule:
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 3

- package-ecosystem: "npm"
directory: "/frontend"
schedule:
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 2
14 changes: 7 additions & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": false,
"plugins": ["prettier-plugin-tailwindcss"]
}
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": false,
"plugins": ["prettier-plugin-tailwindcss"]
}
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"prettier.requireConfig": true
}
{
"prettier.requireConfig": true
}
246 changes: 123 additions & 123 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,123 +1,123 @@
- Note: [Formatting](#format-code) the Code before Pushing is Important!!
## Steps
### Clone the Repository
To Clone this Repository, open a terminal in a empty folder and type
```bash
git clone https://github.com/Jonak-Adipta-Kalita/JAK-Website.git
```
### Installing The Required Modules
To install the required modules, just open a terminal in the directory where this project is cloned.
For the Backend:
```bash
cd backend
pip install virtualenv
virtualenv venv
.\venv\Scripts\activate
pip install -r .\requirements.txt
```
For the Frontend
```bash
cd frontend
npm i
# or
cd frontend
yarn
```
### Getting Django Secret Key
`python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"`
type this in your Terminal. Copy the Output. This is Your DJANGO_SECRET_KEY.
### Getting JWT Secret
Use the [passwordgenerator](https://passwordsgenerator.net/) website to generate your secret.
### Gettigng hCaptcha Keys
### Getting PostgreSQL Credentials
Create a Postgres Database using a online provider or you can create a local one, then you will get your Postgres credentials.
### Passing the Required Credentials
Create a new file `.env` in the `backend` folder and new file `.env.local` in the `frontend` folder. In the
`.env` file, paste the following:
```env
PRODUCTION=False
SECRET_KEY=<YOUR_DJANGO_SECRET_KEY>
JWT_SECRET=<YOUR_JWT_SECRET>
# Postgres
POSTGRESS_HOST=<YOUR_POSTGRESS_HOST>
POSTGRESS_DATABASE=<YOUR_POSTGRESS_DATABASE>
POSTGRESS_USER=<YOUR_POSTGRESS_USER>
POSTGRESS_PORT=<YOUR_POSTGRESS_PORT>
POSTGRESS_PASSWORD=<YOUR_POSTGRESS_PASSWORD>
```
and in the `.env.local` file, paste the following:
```env
NEXT_PUBLIC_BACKEND_URL=http://127.0.0.1:8000
NEXT_PUBLIC_HCAPTCHA_SITE_KEY=<YOUR_HCAPTCHA_SITE_KEY>
HCAPTCHA_SECRET_KEY=<YOUR_HCAPTCHA_SECRET_KEY>
RAPIDAPI_KEY=<YOUR_RAPIDAPI_KEY>
```
### Running the Backend:
To run the backend, open a terminal in the directory. Now type
```bash
cd backend
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
```
to run the backtend. After you did that, go to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) or
[http://localhost:8000/](http://localhost:8000/).
### Running the Frontend
To run the frontend, open a terminal in the directory. Now type
```bash
cd frontend
npm run dev
# or
cd frontend
yarn dev
```
to run the frontend. After you did that, go to [http://127.0.0.1:3000/](http://127.0.0.1:3000/) or
[http://localhost:3000/](http://localhost:3000/).
## Format Code
In a terminal, type
```bash
cd backend
.\venv\Scripts\activate
black .
deactivate
```
and press Enter.
- Note: [Formatting](#format-code) the Code before Pushing is Important!!

## Steps

### Clone the Repository

To Clone this Repository, open a terminal in a empty folder and type

```bash
git clone https://github.com/Jonak-Adipta-Kalita/JAK-Website.git
```

### Installing The Required Modules

To install the required modules, just open a terminal in the directory where this project is cloned.

For the Backend:

```bash
cd backend
pip install virtualenv
virtualenv venv
.\venv\Scripts\activate
pip install -r .\requirements.txt
```

For the Frontend

```bash
cd frontend
npm i

# or

cd frontend
yarn
```

### Getting Django Secret Key

`python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"`
type this in your Terminal. Copy the Output. This is Your DJANGO_SECRET_KEY.

### Getting JWT Secret

Use the [passwordgenerator](https://passwordsgenerator.net/) website to generate your secret.

### Gettigng hCaptcha Keys

### Getting PostgreSQL Credentials

Create a Postgres Database using a online provider or you can create a local one, then you will get your Postgres credentials.

### Passing the Required Credentials

Create a new file `.env` in the `backend` folder and new file `.env.local` in the `frontend` folder. In the
`.env` file, paste the following:

```env
PRODUCTION=False
SECRET_KEY=<YOUR_DJANGO_SECRET_KEY>
JWT_SECRET=<YOUR_JWT_SECRET>

# Postgres
POSTGRESS_HOST=<YOUR_POSTGRESS_HOST>
POSTGRESS_DATABASE=<YOUR_POSTGRESS_DATABASE>
POSTGRESS_USER=<YOUR_POSTGRESS_USER>
POSTGRESS_PORT=<YOUR_POSTGRESS_PORT>
POSTGRESS_PASSWORD=<YOUR_POSTGRESS_PASSWORD>
```

and in the `.env.local` file, paste the following:

```env
NEXT_PUBLIC_BACKEND_URL=http://127.0.0.1:8000
NEXT_PUBLIC_HCAPTCHA_SITE_KEY=<YOUR_HCAPTCHA_SITE_KEY>
HCAPTCHA_SECRET_KEY=<YOUR_HCAPTCHA_SECRET_KEY>
RAPIDAPI_KEY=<YOUR_RAPIDAPI_KEY>
```

### Running the Backend:

To run the backend, open a terminal in the directory. Now type

```bash
cd backend
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
```

to run the backtend. After you did that, go to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) or
[http://localhost:8000/](http://localhost:8000/).

### Running the Frontend

To run the frontend, open a terminal in the directory. Now type

```bash
cd frontend
npm run dev

# or

cd frontend
yarn dev
```

to run the frontend. After you did that, go to [http://127.0.0.1:3000/](http://127.0.0.1:3000/) or
[http://localhost:3000/](http://localhost:3000/).

## Format Code

In a terminal, type

```bash
cd backend
.\venv\Scripts\activate
black .
deactivate
```

and press Enter.
Loading
Loading