Skip to content

SMU-IS/Timperio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

182 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

fe workflow be workflow cd workflow

IS442 T5 Timperio Project



Tech Stack

Getting Started

  1. Clone the project

    git clone https://github.com/SMU-IS/Timperio
    
  2. Install dependencies

    cd frontend
    npm install
    
    cd backend
    mvn clean install -U
    
  3. Set up environment variables

    create the file .env at backend/.env

    DB_URL=jdbc:postgresql://localhost:5432/timperiodb
    DB_USERNAME=postgres
    DB_PASSWORD=root
    JWT_SECRET_KEY={JWT_SECRET_KEY}
    SERVER=//localhost:5173
    MAILCHIMP_API_KEY={MAILCHIMP_API_KEY}
    FRONT_END_SERVER_URL=https://timperio-t5.vercel.app
    TEMPLATE_DIR=template
    TEMPLATE_FILE_NAME=campaign_template.html
    LOGIN_EMAIL={EMAIL}
    LOGIN_PASSWORD={PASSWORD}
    

    create the file .env at frontend/.env

    VITE_SERVER=http://localhost:8080
    
  4. Run the project in development environment

    frontend - npm run dev
    backend - mvn spring-boot:run
    
  5. Login credentials

    Role Email Password
    ADMIN admin@timperio.com password123
    MARKETING marketing@timperio.com password123
    SALES sales@timperio.com password123
  6. Populate local database

    Authenticate to obtain a token

    POST /api/v1/auth/login
    Content-Type: application/json
       {
           "userEmail": "your-email",
           "password": "your-password"
       }
    Response
    200 OK
       {
        "token": "your-jwt-token",
        "expiresIn": 3600,
        "role": "ADMIN"
       }
    

    Call this endpoint to populate your local database

    POST /api/v1/import-data
    Authorization: Bearer your-jwt-token
    Response
    200 OK
    Customer and Purchase History tables populated
    

API Documentation

http://18.142.86.101:8080/swagger-ui/index.html

Acknowledgements

Developed by Team 5

ย  ย  ย  ย 

About

๐ŸŽ“ IS442 - Object Oriented Programming (Grade: A)

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages