Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EricMartinez758/corpointa-frontend/llms.txt

Use this file to discover all available pages before exploring further.

By the end of this guide you will have a fully functional Corpointa development environment running on your local machine, connected to a backend API, and ready for you to sign in and explore every module. The entire process — from cloning the repository to seeing the login screen — takes fewer than five minutes on a standard internet connection.
1

Prerequisites

Before you begin, make sure the following are available on your machine:
  • Node.js ≥ 18Download from nodejs.org
  • pnpm — Install globally with npm install -g pnpm if not already present
  • A running Corpointa backend — The frontend expects a REST API to be reachable. If no VITE_API_URL is set, the API client defaults to http://localhost:4000.
You can verify your versions before continuing:
node --version   # should print v18.x.x or higher
pnpm --version   # should print 8.x.x or higher
2

Clone the Repository

Clone the Corpointa frontend from GitHub and move into the project directory:
git clone https://github.com/EricMartinez758/corpointa-frontend.git && cd corpointa-frontend
3

Install Dependencies

Install all project dependencies using pnpm:
pnpm install
pnpm resolves and links the full dependency graph, including Vite, React 19, TanStack Router, TanStack Query, Radix UI, and all other packages declared in package.json.
4

Configure Environment Variables

Copy the provided example environment file and update it for your setup:
cp .env.example .env
The .env.example file contains only the VITE_CLERK_PUBLISHABLE_KEY placeholder. If your backend is not at the default http://localhost:4000, add VITE_API_URL manually. Open .env in your editor:
# .env
VITE_CLERK_PUBLISHABLE_KEY=       # required only when using Clerk auth
VITE_API_URL=http://localhost:4000 # add this line if your backend is elsewhere
Replace http://localhost:4000 with the actual URL of your Corpointa backend if it is hosted elsewhere (e.g., https://api.corpointa.example.com). If VITE_API_URL is omitted, the API client defaults to http://localhost:4000.
5

Run Tests (Optional)

Corpointa uses Vitest with a Playwright browser provider. If you want to run the test suite before starting the dev server, first install the Chromium browser dependency, then execute the tests:
pnpm test:browser:install
pnpm test
This runs all tests headlessly in Chromium. You can skip this step if you just want to launch the application.
6

Start the Development Server

Launch the Vite dev server:
pnpm dev
Vite will start and print output similar to the following:
VITE v8.x.x  ready in 400 ms

➜  Local:   http://localhost:5173/
➜  Network: use --host to expose
Open http://localhost:5173 in your browser to see the Corpointa login screen.
7

Sign In

On the login screen, enter your credentials:
  • Cédula — Your national ID number registered in the system
  • Password — Your account password
After a successful login, the backend returns a JWT which is stored in a browser cookie. All subsequent API requests are automatically authenticated via the Axios request interceptor.
Using Clerk authentication instead? If your deployment uses the Clerk-based auth flow, add your Clerk publishable key to .env before starting the dev server:
VITE_CLERK_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Then navigate to /clerk/sign-in instead of the default login route. See the Configuration guide for full details.

Building for Production

When you are ready to deploy, compile an optimised production bundle:
pnpm build
This runs tsc -b for type-checking followed by vite build. The compiled assets are written to the dist/ directory. To preview the production build locally before deploying:
pnpm preview
vite preview serves the contents of dist/ at http://localhost:4173 so you can validate the build before shipping. The included netlify.toml configures a catch-all redirect (/* → /index.html, HTTP 200) so that client-side routes resolve correctly on Netlify and any other SPA-compatible host.
Keep your code clean throughout development with the built-in linting and formatting scripts:
pnpm lint      # Run ESLint across the entire project
pnpm format    # Auto-format all files with Prettier
Running both before committing helps maintain consistent code style and catches common issues early.

Build docs developers (and LLMs) love