Skip to content

triphopMahithi/corestack-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

corestack-platform 🚀

Table of Contents 📚


Installation ⚙️

Prerequisites 🧑‍💻

Before starting, make sure you have the following installed:

  • TypeScript: A superset of JavaScript that adds static types.
  • Python 3.11.x: Required for backend development.
  • Go language: For building backend services.
  • MongoDB: A NoSQL database.
  • NodeJS: JavaScript runtime for frontend and backend.
  • NGINX: A web server and reverse proxy.
  • Docker: Containerization for easier deployment.

Steps 🔽

  1. Clone the repository

    git clone https://github.com/triphopMahithi/corestack-platform.git
  2. Navigate to the project directory

    cd corestack-platform
  3. Install dependencies

    • Python dependencies:
      pip install -r requirements.txt
    • NodeJS dependencies (Frontend):
      cd ./Apps/frontend
      npm install

Retrieval-augmented generation (RAG)

Platform 🌐

Windows 💻

Download Windows Version

Linux 🐧

curl -fsSL https://ollama.com/install.sh | sh

macOS 🍎

Download macOS Version

Running the RAG Setup

Once you have successfully installed Ollama and completed all necessary dependencies, you can proceed to set up the RAG (Retrieval-Augmented Generation) module.

Run the following commands:

cd ./corestack-platform/Apps/RAG
python setup.py

⚠️ Important:
For production environments, it is strongly recommended to update and secure the .env file with the correct values for your deployment. Example .env Configuration (rag)

CHANNEL_SECRET=YOUR_CHANNEL_SECRET
CHANNEL_TOKEN=YOUR_CHANNEL_TOKEN
OLLAMA_URL=http://<YOUR_DOMAIN_OR_LOCALHOST>:11434/api/generate
OLLAMA_MODEL=YOUR_MODEL
MONGO_URI=mongodb://<YOUR_DOMAIN_OR_LOCALHOST>:27017/
MONGO_DB=YOUR_DATABASE
MONGO_DB_COLLECTION=YOUR_COLLECTION

Usage Recommendation 🛠️

It is recommended to start the application from the backend first, as Golang sets the communication port to PORT: 8080 by default.
Using a different port may cause issues.

Steps to Run

  1. Run Backend

    cd ./Apps/backend
    go run main.go
  2. Run Frontend

    cd ./Apps/frontend
    npm run dev

How to Update

cd ./Apps/backend
vim .env

Example .env Configuration

CHANNEL_SECRET=YOUR_CHANNEL_SECRET
CHANNEL_TOKEN=YOUR_CHANNEL_TOKEN
LINE_LOGIN_CHANNEL_SECRET=YOUR_LINE_LOGIN_CHANNEL_SECRET
REDIRECT_URI=<YOUR_DOMAIN_OR_LOCALHOST>/api/auth/callback
OLLAMA_URL=<YOUR_DOMAIN_OR_LOCALHOST>:<PORT_OR_11434>/api/generate
OLLAMA_MODEL=YOUR_MODEL
MONGO_URI=mongodb://<YOUR_DOMAIN_OR_LOCALHOST>:<PORT_OR_27017>/
MONGO_DB=YOUR_DATABASE
MONGO_DB_COLLECTION=YOUR_COLLECTION
USERS_COLLECTION=users
JWT_SECRET=YOUR_JWT_SECRET
JWT_ISSUER=anan-ip
JWT_AUDIENCE=frontend-app
SECRET_KEY=YOUR_SECRET_KEY
FRONTEND_URL=<YOUR_DOMAIN_OR_LOCALHOST>:<PORT_OR_8081>
PORT=8080

Note: For more information and detailed documentation, please visit LINE Developers.

Explanation of Environment Variables

  • CHANNEL_SECRET
    The secret key for your LINE Messaging API channel. Used to authenticate your application with the LINE platform.

  • CHANNEL_TOKEN
    The access token for your LINE Messaging API channel. Required for sending messages or making API calls to LINE.

  • LINE_LOGIN_CHANNEL_SECRET
    The secret key for your LINE Login channel. Used when implementing LINE Login for user authentication.

  • REDIRECT_URI
    The callback URL to which LINE will redirect users after successful login.
    Example:

    • Production: https://yourdomain.com/api/auth/callback
    • Development: http://localhost:8080/api/auth/callback

Project Structure 📁

CORESTACK-PLATFORM
└── Apps
    ├── backend
    │   ├── config
    │   ├── database
    │   ├── handlers
    │   ├── models
    │   ├── services
    │   └── utils
    └── frontend
        └── src
            ├── components
            │   ├── steps
            │   └── ui
            ├── contexts
            ├── hooks
            ├── lib
            ├── pages
            └── utils

Description 📝

This project is a Full-Stack Web Application integrating TypeScript, Python, Go, MongoDB, NodeJS, NGINX, and Docker.
It streamlines the development process by combining multiple tools into a single platform, making it ideal for building and deploying scalable web applications.

Preview

Home Page

Figure 1: Home Page

Shopping Cart

Figure 2: Shopping Cart System

Product Editing

Figure 3: Product Editing Page

Issue Inspection

Figure 4: Issue Inspection Interface

Admin Dashboard

Figure 5: Admin Dashboard

RAG

Figure 6: (Simple) Retrieval-augmented generation


Contributing 🤝

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-branch
  3. Commit your changes:
    git commit -am 'Add new feature'
  4. Push to your branch:
    git push origin feature-branch
  5. Create a Pull Request.

Supporters & Funding 💡

Tranak Nitiwong - anan.ip


Contact 📬

For questions or support, please contact: https://www.facebook.com/anan.invest

About

Full-stack web platform with multi-language support and production-ready architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •