https://github.com/lowleery/vwebx
A modern, fast, and flexible web framework for the V programming language
https://github.com/lowleery/vwebx
api framework http json rest server sqlite v web
Last synced: 4 months ago
JSON representation
A modern, fast, and flexible web framework for the V programming language
- Host: GitHub
- URL: https://github.com/lowleery/vwebx
- Owner: LowLeery
- License: mit
- Created: 2025-06-10T10:02:37.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-06-10T10:43:36.000Z (8 months ago)
- Last Synced: 2025-06-10T11:28:11.905Z (8 months ago)
- Topics: api, framework, http, json, rest, server, sqlite, v, web
- Language: V
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VWebX
[](https://vlang.io)
[](LICENSE)
[](https://vwebx.github.io/docs)
[](https://github.com/LowLeery/vwebx/stargazers)
[](https://github.com/LowLeery/vwebx/network/members)
[](https://github.com/LowLeery/vwebx/issues)
A modern, fast, and flexible web framework for the V programming language.
## Features
- 🚀 **High Performance**: Built on V's fast HTTP server
- 🔌 **Middleware Support**: Easy to extend with custom middleware
- 📦 **JSON Processing**: Built-in JSON encoding/decoding
- 🎨 **Template Engine**: Simple and powerful templating
- 💾 **Database Integration**: SQLite support out of the box
- 🔒 **Security**: Built-in security features
- 📝 **Validation**: Request validation and sanitization
- ⚙️ **Configuration**: Flexible configuration system
- 🛠 **Developer Experience**: Clean API and helpful error messages
## Quick Start
### Installation
```bash
v install vwebx
```
### Basic Example
```v
import vwebx
struct App {
vwebx.App
}
fn new_app() &App {
mut app := &App{
App: vwebx.new_app()
}
return app
}
fn (mut app App) index() vwebx.Result {
return app.json({
'message': 'Hello, VWebX!'
})
}
fn main() {
mut app := new_app()
app.get('/', app.index)
app.run()
}
```
## Documentation
For detailed documentation, visit [https://lowleery.github.io/vwebx](https://lowleery.github.io/vwebx/#docs)
### API Reference
#### HTTP Methods
```v
app.get('/path', handler)
app.post('/path', handler)
app.put('/path', handler)
app.delete('/path', handler)
```
#### Middleware
```v
app.use(middleware_fn)
app.use_global(global_middleware_fn)
```
#### Response Helpers
```v
ctx.text('Hello') // Text response
ctx.json(data) // JSON response
ctx.html('
Hi
') // HTML response
ctx.file('file.txt') // File response
```
## Examples
Check out the [examples](examples/) directory for more usage examples:
- [Hello World](examples/hello_world.v)
- [REST API](examples/rest_api.v)
- [Template Usage](examples/template.v)
- [Database Integration](examples/database.v)
## Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## Roadmap
- [ ] Authentication & Authorization
- [ ] WebSocket Support
- [ ] PostgreSQL Support
- [ ] Redis Integration
- [ ] GraphQL Support
- [ ] OpenAPI/Swagger Integration
- [ ] Testing Framework
- [ ] CLI Tool
## Community
- [Discord Server](https://discord.gg/vwebx)
- [GitHub Discussions](https://github.com/vwebx/vwebx/discussions)
- [Twitter](https://twitter.com/vwebx)
## License
VWebX is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- [V Programming Language](https://vlang.io)
- [All Contributors](https://github.com/vwebx/vwebx/graphs/contributors)
---
Made with ❤️ by the VWebX Contributors