Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bongomin/studentsandteachersapp

An integrated web application for managing student and teacher information. Utilizes Django for the backend API and React for the frontend UI
https://github.com/bongomin/studentsandteachersapp

Last synced: 17 days ago
JSON representation

An integrated web application for managing student and teacher information. Utilizes Django for the backend API and React for the frontend UI

Awesome Lists containing this project

README

        

# StudentsAndTeachersApp

This web application manages CRUD (Create, Read, Update, Delete) operations for students and teachers. It also demonstrates a many-to-many relationship where students are associated with teachers.

## Screenshots

### API Insomnia | Postman Test

insonmia api test
students list
teachersList

### Application Home Page
Home Page

### Frontend - Students List
Stunets List

## Create Student Form
Create Students

### Frontend - Teachers List
Teachers

## Create - Teachers Form
Create Teacher

## Project Structure

The project is organized into two main parts: the backend and the frontend.

- Backend: Developed using Django REST framework with a PostgreSQL database for data storage. The backend includes unit tests for models, serializers, and viewsets.
- Frontend: Implemented using ReactJS and Redux to manage state changes (State Manager).

## Setting up PostgreSQL Database

1. **Install PostgreSQL:**

Follow the [official PostgreSQL installation guide](https://www.postgresql.org/download/) to install PostgreSQL for your operating system.

2. **Create a Database and User:**

Create a PostgreSQL database and user with appropriate privileges. Replace ``, ``, and `` with your preferred values.

```sql
CREATE DATABASE ;
CREATE USER WITH PASSWORD '';
GRANT ALL PRIVILEGES ON DATABASE TO ;
```

3. **Configure Django Settings:**

Update the Django `DATABASES` settings in your Django project's settings file (`settings.py`), replacing ``, ``, and `` with the values you used in step 2.

```python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': '',
'PASSWORD': '',
'NAME': '',
'HOST': 'localhost',
'PORT': '', # Add port if needed
}
}
```

## Cloning the Project

To clone the project repository, use the following command:

```bash
git clone [email protected]:bongomin/StudentsAndTeachersApp.git
```

## Accessing Backend

To access the backend, navigate to the 'backend' directory:

```bash
cd StudentsAndTeachersApp/backend
```

## Accessing Frontend

To access the frontend, navigate to the 'frontend' directory:

```bash
cd StudentsAndTeachersApp/frontend
```

## Running the Application

Start the backend server:

### Navigate to the backend directory

```bash
cd backend
```

### Install dependencies

```bash
pip install -r requirements.txt
```

### Run the Django server

```bash
python manage.py runserver
```

Start the frontend server:

### Navigate to the frontend directory

```bash
cd frontend
```

### Install dependencies

```bash
npm install
```

### Run the React app

```bash
npm start
```