Go to file
2024-11-19 07:44:27 +07:00
.beaker/data Implement session with beaker 2024-06-13 12:43:46 +07:00
config setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
core Fixing wrong routes in core staticdir 2024-07-31 10:33:24 +07:00
modules/public change the default template 2024-06-05 23:27:52 +07:00
pages/public change the default template 2024-06-05 23:27:52 +07:00
src setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
static/css a template staticdir 2023-12-15 16:58:00 +07:00
templates/plain add plain templates 2024-08-09 15:44:57 +07:00
.gitignore setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
costa.py Implement session with beaker 2024-06-13 12:43:46 +07:00
handler.py setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
index.html setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
install.sh Start to implementing venv 2024-08-09 15:40:04 +07:00
jsconfig.json setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
LICENSE Create LICENSE 2022-03-16 11:15:58 +07:00
package.json setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
pnpm-lock.yaml setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
postcss.config.cjs setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
README.md update folder structure 2024-11-19 07:44:27 +07:00
tailwind.config.cjs setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00
vite.config.js setup Vue, Tailwind and MynaUI with Vite 2024-11-18 21:18:52 +07:00

CostaPy + Vite

Integrate Costapy with Vite, Vue, Tailwind CSS, and Mynaui Icons to create a modern web application.

Requirement & Installation

  • Node.js (20+ recommended)
  • Python (3.8+ recommended)
  • pnpm (optional, you can use npm if preferred)

Clone the repository

Clone the repository with --recursive when cloning the repo.

git clone https://gitea.ditaajipratama.net/ridzimeko/costa-vite-myna.git --recursive

Note that if you forgot the --recursive flag you can do:

git submodule update --init

Note that when submodules have other submodules you need recursive option.

git submodule update --init --recursive

Dependencies

You need this libraries to use CostaPy:

  • bottle
  • gunicorn
  • beaker
  • mako

You can install it with run this command

sh install.sh

Usage

  1. Install Node.js Packages

Install the frontend dependencies using pnpm (or any package manager like npm or yarn):

pnpm install

Alternatively, with npm:

npm install
  1. Build the Project

Build the Vite project for production:

pnpm build

This will generate the build files in the static/vue directory.

  1. Run the Backend Server

Use this command to start the web service

python3 costa.py

Folder Structure

project/
├── costa.py             # Bottle backend script
├── static/
    ├── vue              # Vite build output (generated after running pnpm build)
├── src/                 # Frontend source code
│   ├── components/      # Vue components
│   ├── pages/           # Vue pages
│   ├── assets/          # CSS, images, etc.
│   ├── App.vue          # Main Vue component
│   ├── router.js        # Vue router
│   └── main.js          # Entry point for the Vue app
├── package.json         # Node.js dependencies
├── tailwind.config.cjs  # Tailwind CSS configuration
├── vite.config.js       # Vite configuration
├── jsconfig.json        # VScode IDE configuration for Javascript
└── ...

Configuration

Global Variable (config/globalvar.py)

globalvar.py is the place for storing your Global Variable.

baseurl
Is the variable for your base URL (without / in the end).

title
Is the variable for your web title.

Directory (config/directory.py)

directory.py is the place for storing your path. It is useful to calling the path more efficiently.

Handling the modules

Handling the module is in handler.py.