Convert Figma logo to code with AI

architect logoarchitect

The simplest, most powerful way to build a functional web app (fwa)

2,539
102
2,539
76

Top Related Projects

78,107

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

29,705

The Symfony PHP framework

64,773

Fast, unopinionated, minimalist web framework for node.

66,731

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀

55,872

Ruby on Rails

79,643

The Web framework for perfectionists with deadlines.

Quick Overview

Architect is an open-source framework for building cloud-native applications on AWS. It provides a declarative, high-level interface for defining serverless applications, allowing developers to focus on business logic rather than infrastructure details. Architect simplifies the process of creating and deploying serverless applications using AWS services.

Pros

  • Simplifies serverless application development on AWS
  • Provides a declarative, easy-to-understand syntax for defining infrastructure
  • Supports local development and testing
  • Integrates well with popular AWS services like Lambda, API Gateway, and DynamoDB

Cons

  • Limited to AWS ecosystem, not suitable for multi-cloud deployments
  • May have a learning curve for developers new to serverless architecture
  • Less flexibility compared to directly using AWS CloudFormation or SAM
  • Community and ecosystem are smaller compared to some other serverless frameworks

Code Examples

  1. Defining an HTTP route:
@http({
  method: 'get',
  path: '/hello'
})
export async function hello(req) {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello, World!' })
  }
}
  1. Working with DynamoDB:
import data from '@architect/data'

export async function saveItem(item) {
  return await data.items.put(item)
}

export async function getItem(id) {
  return await data.items.get({ id })
}
  1. Scheduling a function:
@events('daily-cleanup')
export async function cleanup() {
  // Perform daily cleanup tasks
  console.log('Running daily cleanup')
}

Getting Started

  1. Install Architect globally:

    npm install -g @architect/architect
    
  2. Create a new Architect project:

    arc init my-project
    cd my-project
    
  3. Add a route to your app.arc file:

    @http
    get /hello
    
  4. Implement the route handler in src/http/get-hello/index.js:

    exports.handler = async function http(req) {
      return {
        statusCode: 200,
        headers: { 'content-type': 'text/html; charset=utf8' },
        body: '<h1>Hello World!</h1>'
      }
    }
    
  5. Start the local development server:

    arc sandbox
    
  6. Deploy to AWS:

    arc deploy
    

Competitor Comparisons

78,107

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

Pros of Laravel

  • Extensive documentation and large community support
  • Built-in features like authentication, routing, and ORM
  • Robust ecosystem with many packages and tools

Cons of Laravel

  • Steeper learning curve for beginners
  • Can be overkill for small projects
  • Performance may be slower compared to lightweight frameworks

Code Comparison

Laravel:

Route::get('/users', function () {
    return User::all();
});

Architect:

app.get('/users', async (req, res) => {
  let users = await getUsers()
  res.json(users)
})

Summary

Laravel is a full-featured PHP framework with a rich ecosystem and extensive tooling, making it ideal for large-scale applications. It offers built-in solutions for common web development tasks but may be complex for smaller projects.

Architect, on the other hand, is a lightweight framework for building and deploying serverless applications. It focuses on simplicity and ease of use, making it suitable for smaller projects and rapid development. However, it may lack some of the advanced features and extensive community support that Laravel provides.

The choice between the two depends on project requirements, team expertise, and scalability needs. Laravel excels in traditional web applications, while Architect shines in serverless architectures.

29,705

The Symfony PHP framework

Pros of Symfony

  • More mature and established framework with a larger community and ecosystem
  • Comprehensive set of components and tools for building complex web applications
  • Extensive documentation and learning resources available

Cons of Symfony

  • Steeper learning curve due to its complexity and extensive features
  • Heavier footprint, which may impact performance for smaller projects
  • More opinionated structure, potentially limiting flexibility for some developers

Code Comparison

Symfony (routing example):

use Symfony\Component\Routing\Annotation\Route;

class ProductController extends AbstractController
{
    #[Route('/product/{id}', name: 'product_show')]
    public function show(int $id): Response
    {
        // ...
    }
}

Architect (routing example):

const arc = require('@architect/functions')

exports.handler = arc.http(async function http(req) {
  return {
    statusCode: 200,
    body: 'Hello World!'
  }
})

The code examples demonstrate different approaches to routing. Symfony uses annotations and a controller-based structure, while Architect employs a more function-based approach with AWS Lambda-style handlers.

64,773

Fast, unopinionated, minimalist web framework for node.

Pros of Express

  • Mature and widely adopted framework with extensive documentation and community support
  • Flexible and minimalist design allows for easy customization and integration with other libraries
  • Large ecosystem of middleware and plugins for various functionalities

Cons of Express

  • Requires more boilerplate code for setting up routes and middleware
  • Less opinionated, which can lead to inconsistent project structures across different teams
  • Manual configuration needed for modern features like serverless deployment

Code Comparison

Express:

const express = require('express');
const app = express();

app.get('/', (req, res) => {
  res.send('Hello World!');
});

app.listen(3000, () => console.log('Server running on port 3000'));

Architect:

const arc = require('@architect/functions');

exports.handler = arc.http.async(handler);

async function handler(req) {
  return { statusCode: 200, body: 'Hello World!' };
}

The Express code shows a traditional server setup, while Architect demonstrates a serverless function approach. Express requires more setup but offers more control, whereas Architect simplifies deployment to serverless environments.

66,731

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀

Pros of Nest

  • More comprehensive framework with built-in dependency injection and modular architecture
  • Stronger TypeScript support and decorators for cleaner code organization
  • Larger community and ecosystem with extensive documentation

Cons of Nest

  • Steeper learning curve due to its opinionated structure and concepts
  • Heavier framework with more overhead, potentially impacting performance
  • Less flexibility for serverless deployments compared to Architect

Code Comparison

Nest:

@Controller('cats')
export class CatsController {
  @Get()
  findAll(): string {
    return 'This action returns all cats';
  }
}

Architect:

export async function get(req) {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'This action returns all cats' })
  }
}

Summary

Nest is a full-featured Node.js framework with strong TypeScript support and a modular architecture, ideal for large-scale applications. It offers robust dependency injection and a rich ecosystem but comes with a steeper learning curve.

Architect, on the other hand, is more lightweight and focused on serverless deployments. It provides greater flexibility and simplicity but lacks some of the advanced features and structure found in Nest.

Choose Nest for complex, enterprise-level applications where strong typing and modularity are crucial. Opt for Architect when building serverless applications with a focus on simplicity and ease of deployment.

55,872

Ruby on Rails

Pros of Rails

  • Mature, battle-tested framework with a large ecosystem and community support
  • Follows "convention over configuration" principle, speeding up development
  • Extensive built-in features and generators for rapid application development

Cons of Rails

  • Can be overkill for smaller projects or microservices
  • Steeper learning curve for beginners due to its opinionated nature
  • Performance can be a concern for high-traffic applications without optimization

Code Comparison

Rails (config/routes.rb):

Rails.application.routes.draw do
  resources :users
  get '/about', to: 'pages#about'
end

Architect (app.arc):

@app
myapp

@http
get /
get /about

@tables
users
  id *String

Rails uses a Ruby DSL for routing and configuration, while Architect uses a more declarative approach with its .arc file format. Rails provides more flexibility and options out of the box, but Architect's simplicity can be advantageous for certain use cases.

Rails is a full-featured web framework, whereas Architect focuses on serverless architecture and cloud deployment. The choice between them depends on project requirements, team expertise, and scalability needs.

79,643

The Web framework for perfectionists with deadlines.

Pros of Django

  • Comprehensive web framework with built-in admin interface, ORM, and authentication system
  • Large, active community with extensive documentation and third-party packages
  • Follows the "batteries included" philosophy, providing many features out of the box

Cons of Django

  • Can be overkill for small projects or microservices
  • Steeper learning curve due to its comprehensive nature
  • Less flexibility in choosing components compared to more modular frameworks

Code Comparison

Django:

from django.db import models

class Book(models.Model):
    title = models.CharField(max_length=200)
    author = models.ForeignKey('Author', on_delete=models.CASCADE)
    publication_date = models.DateField()

Architect:

from architect import install, Model

@install('postgresql')
class Book(Model):
    __tablename__ = 'books'
    __columns__ = ['id', 'title', 'author_id', 'publication_date']

While both frameworks provide ORM capabilities, Django's ORM is more feature-rich and tightly integrated with the framework. Architect focuses on database-specific optimizations and is more lightweight, but requires additional setup for full web application functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Architect Logo

GitHub CI status npm version Apache-2.0 License

Build ultra scalable database backed web apps on AWS serverless infrastructure with full local, offline workflows, and more. Full documentation found at: https://arc.codes

Requirements

Installation

Make sure you have at least Node.js version 14 installed.

Open your terminal to install arc:

npm i @architect/architect --save-dev

Check the version:

npx arc version

Protip: run arc with no arguments to get help

Work locally

Create a new app:

mkdir testapp
cd testapp
npx arc init

Kick up the local dev server:

npx arc sandbox

Cmd / Ctrl + c exits the sandbox

Deploy to AWS

Deploy the staging stack:

npx arc deploy

Protip: create additional staging stacks with --name

Ship to a production stack:

npx arc deploy --production

Add Architect syntax to your text editor

– VS Code

– Sublime Text

– Vim

Learn more

Head to https://arc.codes to learn more!


Founding team

Amber Costley, Angelina Fabbro, Brian LeRoux, Jen Fong-Adwent, Kristofer Joseph, Kris Borchers, Ryan Block, Spencer Kelley

Special thanks

Pinyao Guo for the Architect GitHub name

NPM DownloadsLast 30 Days