|
| 1 | +--- |
| 2 | +title: React + Vite in front of a Skip Service - the template |
| 3 | +description: Build a modern chat app with real-time updates using Skip's reactive data system, React, and Vite |
| 4 | +slug: skip_with_react_vite |
| 5 | +date: 2025-05-30 |
| 6 | +authors: hubyrod |
| 7 | +--- |
| 8 | + |
| 9 | +Hello skippers. Today, we are introducing a new template to our collection: React + Vite. While our previous blog posts focused on building skip services, this new template represents our first step into the frontend, bringing together the best of both worlds: front and back. |
| 10 | + |
| 11 | +```bash |
| 12 | +npx create-skip-service my-skip-chat --template with_react_vite |
| 13 | +``` |
| 14 | + |
| 15 | +{/* trunctate */} |
| 16 | + |
| 17 | +## What's Inside the Template? |
| 18 | + |
| 19 | +Our React + Vite template for Skip Services comes with everything you need to get started on building a modern web application: an easy to manipulate end-to-end data flow from the user interface to the backend, and vice-versa (reactive programming enthusiasts, I have your attention now). |
| 20 | + |
| 21 | +## Getting Started |
| 22 | + |
| 23 | +To create a new project with our React + Vite template, simply run: |
| 24 | + |
| 25 | +```bash |
| 26 | +npx create-skip-service my-skip-chat --template with_react_vite --verbose |
| 27 | + |
| 28 | +cd my-skip-chat # enter the project directory |
| 29 | +./setup.sh # and set up the project |
| 30 | +``` |
| 31 | + |
| 32 | +Setting up the project will end up with: |
| 33 | +```bash |
| 34 | +✅ Setup complete! |
| 35 | + |
| 36 | +To run the application: |
| 37 | +1. Start the reactive service: |
| 38 | + cd reactive_service && pnpm start |
| 39 | + |
| 40 | +2. In a new terminal, start the frontend: |
| 41 | + cd frontend && pnpm dev |
| 42 | + |
| 43 | +The frontend will be available at http://localhost:5173 |
| 44 | +``` |
| 45 | + |
| 46 | +This could hardly ever be simpler :-p |
| 47 | + |
| 48 | +## If you open the project directory |
| 49 | + |
| 50 | +In both subprojects, `frontend` and `reactive_service`, we've hardcoded some values, and taken shortcuts here and there in order to be straight to the point: making reactive programming easy to get, easy to grasp, easy to adopt, easy to embrace. easy to marry... ok, one step too far. |
| 51 | + |
| 52 | +One or two cool things you will want to try: |
| 53 | + - plugging into a DB from the backend, we can give you some help : [Building a Real-time Blog with Skip and PostgreSQL](https://skiplabs.io/blog/postgresql_and_skip) |
| 54 | + - having several conversations on screen, one per tab |
| 55 | + - integrating your user-management system |
| 56 | + - integrating an AI agent to discuss into the chat |
| 57 | + |
| 58 | +We have a [Discord server](https://discord.com/channels/1093901946441703434/1093901946441703437), why don't you swing by and say hi, ask a question or two? |
| 59 | + |
| 60 | + |
| 61 | +## What's Next? |
| 62 | + |
| 63 | +For the next Skip article, what should I tackle first? You tell me! |
| 64 | +- Scaling your Skip service horizontally? |
| 65 | +- Having an AI agent interacting in the chat ? |
| 66 | +- Managing authorization and privacy per user? |
| 67 | +- What else would be most useful to you now? |
0 commit comments