-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
64 lines (45 loc) · 2.05 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from avin_build_tools import *
import tkinter as tk
from tkinter import ttk
import customtkinter as ctk
from customtkinter import *
# basic GUI setup
root = ctk.CTk()
root.title("Stackbuild")
root.geometry("600x500")
# icon_path = os.path.join(os.path.dirname(__file__), 'assets', 'appicon.ico')
# appicon = root.wm_iconbitmap(icon_path)
set_appearance_mode("light")
tabControl = ttk.Notebook(root)
# different switchable tabs for easy navigation and organisation
# Frontend Tab
frontend_tab = ttk.Frame(tabControl)
tabControl.add(frontend_tab, text='Frontend')
# Backend Tab
backend_tab = ttk.Frame(tabControl)
tabControl.add(backend_tab, text='Backend')
# Fullstack Tab
fullstack_tab = ttk.Frame(tabControl)
tabControl.add(fullstack_tab, text='New Setup')
# Add a logging window to show progress
log_frame = ttk.LabelFrame(root, text="Setup Log", padding=(10, 10))
log_frame.pack(fill='both', expand=True, padx=10, pady=10)
log_widget = tk.Text(log_frame, wrap='word', height=10)
log_widget.pack(fill='both', expand=True)
# Frontend Tab Buttons (React, Next.js)
react_button = ctk.CTkButton(master=frontend_tab, corner_radius=32, text="Create React App", command=lambda: create_react_app(log_widget))
react_button.pack(pady=10)
next_button = ctk.CTkButton(master=frontend_tab, corner_radius=32, text="Create Next.js App", command=lambda: create_next_app(log_widget))
next_button.pack(pady=10)
Vue_button = ctk.CTkButton(master=frontend_tab, corner_radius=32, text="Create Vue App", command=lambda: create_vue_app(log_widget))
Vue_button.pack(pady=10)
# Backend Tab Buttons (Django, others)
django_button = ctk.CTkButton(master=backend_tab, corner_radius=32, text="Create Django Project", command=lambda: create_django_app(log_widget))
django_button.pack(pady=10)
# Fullstack Tab Placeholder (can add more setups here)
new_setup_button = ctk.CTkButton(master=fullstack_tab, corner_radius=32, text="Add New Setup", command=add_new_setup)
new_setup_button.pack(pady=10)
# Pack and show the tabs
tabControl.pack(expand=1, fill="both")
# Start the main loop of the GUI
root.mainloop()