This repository contains a full-stack application developed using Django Rest Framework for the backend and React TypeScript (with Vite) for the frontend. The goal of this application is to provide a system similar to Replit, where users can register, login, create, share, and delete workspaces known as "Cpods." Within a Cpod, users can add files for coding in an online editor, which supports live collaboration. Additionally, users can execute the code by clicking the "Run" button. The code execution takes place in a Kubernetes cluster's pod, and the results are displayed in a dedicated "console" section.
-
User Authentication: Users can register and login securely.
-
Workspace Management: Users can create, share, and delete Cpods (workspaces).
-
Online Editor: Users can add and edit files within Cpods using an online editor.
-
Live Collaborative Editing: Supports real-time collaboration within the editor.
-
Code Execution: Users can execute the code within Cpods, utilizing a Kubernetes cluster's pod for execution.
-
Console Display: Results of the code execution are displayed in a dedicated console section.
- minikube v1.32.0
- kubectl v1.28
- node >= v16
- python 3.9.x
- docker compose v2.21
The are two options for complete this task.
-
With conda (anaconda or miniconda)
-
First create a conda env with the command:
conda create --name podchy-env python=3.9
-
Then activate the env:
conda activate podchy-env
(activate this in every terminal instance where you run the backend service)
-
-
With
venv
module-
Execute the command
python3 -m venv podchy-env
-
Activate the env with
source podchy-env/bin/activate
(activate the env in every terminal instance where you want run the backend service)
-
If you don't want use a virtual Python environment be careful with modules conflicts.
-
Move to
installation
directory with:cd installation
command -
Then run
make install
This will install backend and frontend requirements, if you have some issues, make sure python env is correctly configured.
- In the installation folder run:
make resources
-
In the installation folder run:
make run-api
-
(Only first time) For apply the Django migrations run:
make migrate
. Optionally you cand create a superuser account withmake createsuperuser
.
-
(In another terminal instance) In the installation folder run:
make run-web
-
Then visit: http://localhost:3002 in any browser.
- Run
make stop
to stop the database service and minikube.
- Django Rest Framework
- Django
- Kubernetes
- React
- TypeScript
- Vite
- Access the application through the provided URL after starting both the backend and frontend servers.
- Register or log in to your account.
- Create a new Cpod/workspace or access existing ones.
- Add files for coding and utilize the online editor for real-time collaboration.
- Click the "Run" button to execute the code in a Kubernetes cluster's pod.
- View the results in the dedicated console section.
Thanks to contribuitors.
-
Joel Perca
-
Misael Vilchez
-
Kate Olazabal
-
Edgar Espinoza