Skip to content

Commit ed87808

Browse files
committed
update descriptions
1 parent ac35406 commit ed87808

File tree

6 files changed

+94
-51
lines changed

6 files changed

+94
-51
lines changed

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
# RustWebApp
22

3-
Welcome to Juras... I mean RustWebApp! A multiplayer puzzle games platform.
3+
Welcome to RustWebApp! An early-stage but solid template repository for building modern web applications using Rust on the server and SvelteJS on the frontend with an islands architecture.
4+
5+
# Architecture
6+
7+
This template implements a modern web application architecture with:
8+
9+
- **Backend**: Rust with Axum web framework, providing high-performance API endpoints
10+
- **Frontend**: SvelteJS with TypeScript, offering reactive UI components
11+
- **Database**: PostgreSQL with Diesel ORM for type-safe database operations
12+
- **Authentication**: JWT-based authentication system
13+
- **Deployment**: Docker containerization with Fly.io deployment support
14+
- **Development**: Hot reload for both frontend and backend development
15+
16+
The template follows an islands architecture pattern, allowing for server-side rendering with selective client-side hydration where needed.
417

518
# Developer Setup
619

7-
RustWebApp can be developed locally on your host of choice, or, entirely on Docker. We minimally use Docker to run local development databases.
20+
This template provides a solid foundation for building web applications with Rust backend and SvelteJS frontend. While still in early development, it includes the essential components needed to get started. It can be developed locally on your host of choice, or entirely on Docker. We minimally use Docker to run local development databases.
821

922
> 🪟 **Windows** - I highly recommend using WSL - the Windows Subsystem for Linux, which Docker can also use for it's backend.
1023
>
@@ -62,8 +75,28 @@ Hi YOUR_USER_NAME! You've successfully authenticated, but GitHub does not provid
6275
6376
```shell
6477
git clone git@github.com:kyle-rader/rustwebapp.git
78+
cd rustwebapp
6579
```
6680
81+
## Quick Start
82+
83+
1. **Clone the repository** (see above)
84+
2. **Set up your development environment** (see Developer Setup below)
85+
3. **Start the development servers**:
86+
```shell
87+
docker-compose up
88+
```
89+
4. **Access your application**:
90+
- Frontend: http://localhost:5173
91+
- Backend API: http://localhost:3000
92+
5. **Customize the template**:
93+
- Update the application name and branding
94+
- Modify the database schema in `server/migrations/`
95+
- Add new API endpoints in `server/src/web/routes/`
96+
- Create new Svelte components in `client/src/lib/components/`
97+
98+
> ⚠️ **Note**: This template is still in early development. While it provides a solid foundation, you may encounter rough edges or missing features. Contributions and feedback are welcome!
99+
67100
## Develop
68101
69102
### On Docker

client/src/routes/+page.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
<h1 class="container center">RustWebApp</h1>
88

9-
<p class="center">Laugh - Solve - Learn</p>
9+
<p class="center">Build - Deploy - Scale</p>
1010

1111
<div class="container options center">
1212
<div class="option">
13-
<input type="text" placeholder="Code" />
14-
<button class="button">Join Game</button>
13+
<h2>Quick Start</h2>
14+
<button class="button">Get Started</button>
1515
</div>
1616
<div class="option">
17-
<h2>Host</h2>
18-
<button class="button">Create Lobby</button>
17+
<h2>Documentation</h2>
18+
<button class="button">View Docs</button>
1919
</div>
2020
<div class="option">
21-
<h2>Play Solo</h2>
22-
<button class="button">Choose Game</button>
21+
<h2>Examples</h2>
22+
<button class="button">Browse Examples</button>
2323
</div>
2424
</div>
2525

client/src/routes/about/+page.svelte

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,27 @@
3232
</div>
3333

3434
<p>
35-
RustWebApp is a game development company that focuses on creating games that are fun and
36-
engaging. We believe that games should be accessible to everyone, which is why we strive to
37-
create games that are easy to learn and play. Our goal is to create games that bring people
38-
together and provide a sense of community.
35+
RustWebApp is an early-stage template repository designed to accelerate the development of
36+
modern web applications. It combines the performance and safety of Rust on the backend with
37+
the reactivity and developer experience of SvelteJS on the frontend.
38+
</p>
39+
40+
<p>
41+
This template implements an islands architecture, allowing you to build interactive web
42+
applications with server-side rendering and client-side hydration where needed. It includes
43+
authentication, database integration, API development, and a complete development
44+
environment with Docker support.
45+
</p>
46+
47+
<p>
48+
While still in early development, this template provides a solid foundation for building
49+
SaaS applications, content management systems, or any other web service. It's designed to
50+
get you started quickly while maintaining the flexibility to scale as your needs grow.
51+
</p>
52+
53+
<p>
54+
<strong>Note:</strong> This is a work in progress. You may encounter rough edges or missing features,
55+
but the core architecture is stable and ready for development.
3956
</p>
4057
</div>
4158

client/src/routes/logout/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
function logout() {
77
user.logout();
8-
// redirect to Games Page
8+
// redirect to Home Page
99
goto('/');
1010
}
1111
</script>

client/src/routes/page.test.ts

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ describe('Main Page', () => {
1212
it('renders the tagline', () => {
1313
render(Page);
1414

15-
expect(screen.getByText(/laugh - solve - learn/i)).toBeInTheDocument();
15+
expect(screen.getByText(/build - deploy - scale/i)).toBeInTheDocument();
1616
});
1717

18-
it('renders the join game section', () => {
18+
it('renders the quick start section', () => {
1919
render(Page);
2020

21-
expect(screen.getByPlaceholderText(/code/i)).toBeInTheDocument();
22-
expect(screen.getByRole('button', { name: /join game/i })).toBeInTheDocument();
21+
expect(screen.getByRole('heading', { name: /quick start/i })).toBeInTheDocument();
22+
expect(screen.getByRole('button', { name: /get started/i })).toBeInTheDocument();
2323
});
2424

25-
it('renders the host section', () => {
25+
it('renders the documentation section', () => {
2626
render(Page);
2727

28-
expect(screen.getByRole('heading', { name: /host/i })).toBeInTheDocument();
29-
expect(screen.getByRole('button', { name: /create lobby/i })).toBeInTheDocument();
28+
expect(screen.getByRole('heading', { name: /documentation/i })).toBeInTheDocument();
29+
expect(screen.getByRole('button', { name: /view docs/i })).toBeInTheDocument();
3030
});
3131

32-
it('renders the solo play section', () => {
32+
it('renders the examples section', () => {
3333
render(Page);
3434

35-
expect(screen.getByRole('heading', { name: /play solo/i })).toBeInTheDocument();
36-
expect(screen.getByRole('button', { name: /choose game/i })).toBeInTheDocument();
35+
expect(screen.getByRole('heading', { name: /examples/i })).toBeInTheDocument();
36+
expect(screen.getByRole('button', { name: /browse examples/i })).toBeInTheDocument();
3737
});
3838

3939
it('includes ResponsivePad component', () => {
@@ -44,22 +44,12 @@ describe('Main Page', () => {
4444
expect(responsivePad).toBeInTheDocument();
4545
});
4646

47-
it('has proper form structure for join game', () => {
48-
render(Page);
49-
50-
const codeInput = screen.getByPlaceholderText(/code/i);
51-
const joinButton = screen.getByRole('button', { name: /join game/i });
52-
53-
expect(codeInput).toHaveAttribute('type', 'text');
54-
expect(joinButton).toBeInTheDocument();
55-
});
56-
5747
it('has accessible button labels', () => {
5848
render(Page);
5949

60-
expect(screen.getByRole('button', { name: /join game/i })).toBeInTheDocument();
61-
expect(screen.getByRole('button', { name: /create lobby/i })).toBeInTheDocument();
62-
expect(screen.getByRole('button', { name: /choose game/i })).toBeInTheDocument();
50+
expect(screen.getByRole('button', { name: /get started/i })).toBeInTheDocument();
51+
expect(screen.getByRole('button', { name: /view docs/i })).toBeInTheDocument();
52+
expect(screen.getByRole('button', { name: /browse examples/i })).toBeInTheDocument();
6353
});
6454

6555
it('renders all three main options', () => {
@@ -70,16 +60,17 @@ describe('Main Page', () => {
7060
expect(options).toHaveLength(3);
7161

7262
// Check for specific buttons
73-
expect(screen.getByRole('button', { name: /join game/i })).toBeInTheDocument();
74-
expect(screen.getByRole('button', { name: /create lobby/i })).toBeInTheDocument();
75-
expect(screen.getByRole('button', { name: /choose game/i })).toBeInTheDocument();
63+
expect(screen.getByRole('button', { name: /get started/i })).toBeInTheDocument();
64+
expect(screen.getByRole('button', { name: /view docs/i })).toBeInTheDocument();
65+
expect(screen.getByRole('button', { name: /browse examples/i })).toBeInTheDocument();
7666
});
7767

78-
it('has proper input field for game code', () => {
68+
it('has proper section structure', () => {
7969
render(Page);
8070

81-
const codeInput = screen.getByPlaceholderText(/code/i);
82-
expect(codeInput).toBeInTheDocument();
83-
expect(codeInput).toHaveAttribute('type', 'text');
71+
// Check that all section headings are present
72+
expect(screen.getByRole('heading', { name: /quick start/i })).toBeInTheDocument();
73+
expect(screen.getByRole('heading', { name: /documentation/i })).toBeInTheDocument();
74+
expect(screen.getByRole('heading', { name: /examples/i })).toBeInTheDocument();
8475
});
8576
});

client/tests/main.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,17 @@ test.describe('Main Application', () => {
6363
await expect(page.getByRole('heading', { name: 'RustWebApp' })).toBeVisible();
6464

6565
// Check tagline
66-
await expect(page.getByText('Laugh - Solve - Learn')).toBeVisible();
66+
await expect(page.getByText('Build - Deploy - Scale')).toBeVisible();
6767

6868
// Check main action buttons
69-
await expect(page.getByRole('button', { name: 'Join Game' })).toBeVisible();
70-
await expect(page.getByRole('button', { name: 'Create Lobby' })).toBeVisible();
71-
await expect(page.getByRole('button', { name: 'Choose Game' })).toBeVisible();
72-
73-
// Check input field
74-
await expect(page.getByPlaceholder('Code')).toBeVisible();
69+
await expect(page.getByRole('button', { name: 'Get Started' })).toBeVisible();
70+
await expect(page.getByRole('button', { name: 'View Docs' })).toBeVisible();
71+
await expect(page.getByRole('button', { name: 'Browse Examples' })).toBeVisible();
72+
73+
// Check that all sections are present
74+
await expect(page.getByRole('heading', { name: 'Quick Start' })).toBeVisible();
75+
await expect(page.getByRole('heading', { name: 'Documentation' })).toBeVisible();
76+
await expect(page.getByRole('heading', { name: 'Examples' })).toBeVisible();
7577
});
7678

7779
test('navigation to login page', async ({ page }) => {

0 commit comments

Comments
 (0)