Skip to content

Cosmocloud/React-Starter-Template-Cosmocloud-Hackathon

Repository files navigation

React starter template for Cosmocloud hackathon

Save time in development set up.

Used stack

  • UI - Tailwindcss / ShadCn
  • Authentication - AWS Cognito
  • API client - Axios

Table of Contents

Getting Started

Prerequisites

Before you begin, ensure you have the following installed on your machine:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-repo.git
    cd your-repo
  2. Install dependencies

     npm install
     # or
     yarn install
  3. Set up environment variables Copy the .env.example file to .env and update it with your environment-specific variables.

    cp .env.example .env
  4. Start the development server

    npm run dev
    # or
    yarn dev

    This will start the Vite development server and open your React app in the default browser.

Project Structure

Your Vite React project is organized into the following structure:

├── src
│   ├── components       # Reusable UI components
│   ├── lib              # Utility functions and libraries
│   ├── pages            # Page components (e.g., Home, About, etc.)
│   ├── service
│   │   ├── axios        # Axios configuration and HTTP requests
│   │   ├── amplify      # AWS Amplify configuration and utility functions
│   ├── App.jsx          # Main app component
│   ├── main.jsx         # Entry point for the application
│   └── index.html       # HTML template for the app
├── .env.example         # Example environment variables
├── vite.config.js       # Vite configuration
├── package.json         # Project metadata and scripts
└── README.md            # Project documentation (this file)